Cross-platform folder launcher for developers.
open-cli stores its runtime state in a single storage.json file, then gives you a fast interactive launcher for opening active projects in Finder, Explorer, VS Code, Zed, Cursor, or any custom command you add.
- Cross-platform opener commands.
- Interactive setup with arrow-key prompts.
- Config stored as strict JSON validated by Zod.
- One
storage.jsonfile for settings and saved locations. CONFIG_PATHwritten to.envas an absolute path.- Safe confirmations for destructive actions.
doctorcommand for config, opener, and saved-path validation.updatecommand that preserves config and storage while refreshing the CLI from a repository.- Automatic update checks that notify you when a newer
open-cliversion or revision is available.
- Node.js 18+
pnpm- At least one opener command installed on your machine, for example
code,zed,cursor,explorer,xdg-open, or macOS/usr/bin/open
pnpm install
pnpm build
pnpm link
o setupThat installs the dependencies, builds the single-file CLI outputs, links o
globally, and finishes first-time setup.
If you do not want to link it globally yet, you can still run it locally with:
node dist/index.min.js setupRun:
o setupSetup will ask for:
- The directory that should contain
storage.json. - The openers you want enabled.
- The default opener.
- An optional first saved folder.
- The repository URL or GitHub
owner/repoand branch used later byo update.
Default storage is:
<current-working-directory>/storage
After setup, .env will contain an absolute CONFIG_PATH value.
Run without arguments to open the interactive picker:
oOpen a saved folder by reference:
o my-projectOpen a saved folder with a specific opener:
o open my-project --with vscodePrint the installed CLI version:
o --versiono Interactive picker
o -v | --version Show the installed CLI version
o setup First-time setup
o add <ref> <path> Add a saved folder
o open [ref] Open a saved folder
o rm <id|ref> Remove a saved folder
o rename <id|ref> <ref> Rename a saved reference
o clr Clear all saved folders
o ls List saved folders
o config Open the interactive config menu
o config show Show the current config and openers
o config set ... Change config directly from the command line
o doctor Validate config, openers, and saved paths
o update Refresh the CLI from its configured repository
o help Show help
Runtime state lives in one JSON file:
storage.json: saved folder references, opener definitions, update source, update-check metadata, formatting options, and file location metadata
The schemas are defined with strict Zod objects in src/types.ts.
o config still opens the interactive config menu where you can:
- change the default opener
- add custom openers
- remove openers
- move the storage directory
- change JSON indentation
- change the repository URL and branch used by
o update
You can also change config directly with commands such as:
o config show
o config set default-opener vscode
o config set indent 2
o config set update-repo JeffreyJYZ/open-cli
o config set update-branch main
o config set update-source JeffreyJYZ/open-cli mainMoving storage requires confirmation and rewrites CONFIG_PATH in .env.
When a newer version or repository revision is detected, open-cli prints a reminder to run o update.
o doctor checks:
- whether
CONFIG_PATHpoints at the active config - whether the storage directory exists
- whether saved folders still exist
- whether opener commands are available in
PATH
If saved folders are missing on disk, the doctor can remove them from storage interactively.
o update is designed to keep your saved config and folders while refreshing the CLI code:
- Clone the configured repository and branch into a temporary directory.
- Copy the new repo contents into the current installation.
- Preserve
storage,.env, and.env.local. - Run
pnpm installandpnpm build. - Re-apply
CONFIG_PATHinto.env.
Set the repository URL during setup or later with o config.
GitHub shorthand like JeffreyJYZ/open-cli is accepted and cloned as the
matching GitHub repository automatically.
- Openers use command templates with
{path}and optional{ref}placeholders. - The CLI only stores absolute folder paths.
- If you do not wish to add a global command, you can run
node . <command>