kosh profile
List, create and delete the profiles kept under ~/.kosh/profiles.
Manage the profiles kept under ~/.kosh/profiles.
kosh profile [command]Running kosh profile on its own prints help. Subcommands: list, create, delete.
To switch the active profile use kosh use; to copy a credential from
one profile to another use kosh copy.
kosh profile list
Section titled “kosh profile list”List the profiles stored under ~/.kosh/profiles.
kosh profile list [filter]Arguments: zero or one — a substring filter on the profile name.
Profile Status ------- --------> default active work inactive personal inactiveThe active profile is marked with a green > pointer and an active status.
- Only profile names are read, so no vault is opened and no master password is needed.
- The filter ignores case —
kosh profile list WORKmatcheswork_main. - This is the authoritative view of what your profiles are actually called. Because
profile createcleans up names silently, it is worth checking here after creating one.
Examples
Section titled “Examples”kosh profile listkosh profile list workkosh profile create
Section titled “kosh profile create”Create a new profile, switch to it and set up its vault.
kosh profile create <profile>Arguments: exactly one — the profile name.
Process: cleans up the name → rejects a name already in use (profile already exists) →
prompts for the new master password twice → builds the vault → switches to the new profile.
The order matters: nothing is written to disk until the vault is built, so pressing Ctrl+C at
either password prompt creates nothing and leaves the active profile alone.
Name handling
Section titled “Name handling”This is the only command that cleans up a profile name. Accents are folded to ASCII, characters
outside A–Z a–z 0–9 _ - space are deleted, whitespace runs become a single underscore, repeated
_/- collapse, leading and trailing _/- are stripped, and the result is capped at 252
characters. Case is preserved.
The cleaned name is the real one — the filename, the output prefix, and what every other command
must be given. You are not told that the name changed, so run
kosh profile list afterwards to see what you got.
Two names are rejected outright:
| Error | Cause |
|---|---|
invalid profile name |
The name cleans up to nothing — e.g. "" or $__## |
profile name is reserved by the operating system |
The cleaned name is con, prn, aux, nul, com1–com9 or lpt1–lpt9 — rejected on every platform, not just Windows |
Full rules and a worked-examples table: Naming profiles.
- It switches to the new profile. If you want to stay where you were, run
kosh use <old>afterwards. kosh initis not needed afterwards — the vault is ready to use straight away.- Every profile has its own master password, independent of the others. Losing it permanently locks that profile’s vault, with no recovery mechanism.
- The duplicate check ignores case.
kosh profile create Workfails withprofile already existswhenworkexists, on every platform — including Linux, where the filesystem would allow both. Ctrl+Cat the password prompt creates nothing. Persistent state is only touched once the vault has been built, so abandoning the command at either prompt leaves the config and the profiles directory untouched.- A failed creation rolls itself back. If building the vault fails, the partially created profile file is removed. The active profile is untouched — Kosh only switches once the vault exists — so you can retry the same name.
- If the vault is built but the switch fails, you get
<cause>: profile "<name>" was created but could not be activated. The profile and its vault are intact: runkosh use <name>to switch to it. Do not recreate it — the name is taken and the vault is complete.
Output prefix
Section titled “Output prefix”The password prompts carry the new profile’s name, since that is what they concern. If creation then fails, the failure line appears under the profile that is still active:
(work) [?] enter master password:(default) [✗] failed to initialize vaultExamples
Section titled “Examples”kosh profile create work
kosh profile create work # add a credential to the new profilekosh addkosh profile delete
Section titled “kosh profile delete”Delete a profile along with the vault file holding its credentials.
kosh profile delete <profile>Arguments: exactly one — the profile name.
Safety gates, in order
Section titled “Safety gates, in order”- Refuses if the profile does not exist (
profile does not exist). - Refuses to delete the active profile (
cannot delete active profile) — switch away withkosh usefirst. - Prompts for that profile’s own master password and verifies it, to prove ownership.
- Prints a caution block.
- Requires the exact phrase
permanently delete <name> with credentials.
-
Deletion is permanent. The vault file is overwritten with cryptographically random bytes and synced to disk before it is removed — every credential in that profile is gone for good.
-
The name is matched ignoring case, and the profile is deleted under the spelling it is stored as. The active-profile guard folds case too, so deleting
WORKwhileworkis active is rejected. -
If the target profile’s vault was never initialized, no master password is asked for — there is nothing to verify and no secrets in the file. Kosh reports
vault is not initializedand goes straight to the confirmation gate. The caution block, typed phrase and random-byte overwrite still apply. -
While Kosh works on the target profile, output lines carry the target’s name in the prefix rather than the active profile’s, so the password prompt cannot be mistaken for a request for the wrong password:
(personal) [?] enter master password:
Examples
Section titled “Examples”kosh profile delete work
kosh use default # switch away first if it is the active profilekosh profile delete workSee also
Section titled “See also”- Profiles — the concept and the full walkthrough
- Encryption Architecture — what isolation guarantees