# Adding and removing commands

Think of commands like your dev stack. Anything needed to make your app work locally:

* `npm run dev`
* `bin/rails server`
* `python main.py`
* `next dev`
* `cloudflared tunnel run`
* `stripe listen --forward-to localhost:8000/webhooks/stripe`

You can add commands to any project whenever your current license has capacity for another process, and remove them when you no longer need them.

## Add a command

1. Right-click a project in the sidebar (or right-click any process under it).
2. Choose **Add > Command...**.
3. Enter a name and the shell command to run.

With a name that isn't already used by a command in that project, the new command appears in the sidebar. Reusing an existing command name updates that command instead of adding another row.

New commands created from the UI are trusted immediately. When creating the command you choose where it's stored: **Save to [solo.yml](../projects/solo-yml.md)** for version control (Solo creates the file if the project doesn't have one), or **Store locally only** to keep it on your machine.

## Duplicate commands to another project

If you have another project that needs the same command, you don't have to retype it:

1. Right-click the command in the sidebar.
2. Choose **Duplicate to** and pick the target project, or **Duplicate all commands to** to copy every command in the current project.

Duplication copies the full configuration: the shell command, working directory, environment variables, [auto-start](./auto-start.md) and [auto-restart](./auto-restart.md) settings, [file-watch restart patterns](./file-watch-auto-restart.md), notification settings, trust status, the stop-confirmation preference, the [automatic-renaming](./renaming.md) preference, and the [**Lesser used**](./lesser-used.md) sidebar preference. If the target project already has a command with the same name, the copy is named `Name copy` (then `Name copy 2`, and so on).

Storage carries over too: a command saved in `solo.yml` is written into the target project's `solo.yml` (creating the file if it doesn't exist), while a local command stays local. Only commands can be duplicated — terminals and agents can't.

## Choosing where commands are stored

Every command is stored either **locally** on your machine in Solo's local SQLite database or in the project's `solo.yml`. The **Storage** row in the command settings (**Edit command...**) shows which one and lets you switch:

- **Save to YML** writes a local command into `solo.yml`, marks it as file-backed, and marks it trusted. The file can then be committed and shared. This button appears when the project has a `solo.yml`. This is useful if you want to share with your teammates or another machine.
- **Make local** removes a `solo.yml` command from the file while keeping it in Solo, so it stops being tracked in version control. Useful for commands that don't need to be shared.

If the project doesn't have a `solo.yml` yet, you can create one from the project pane: open the project with **Edit project...** and click **Create solo.yml** on the **Config** row. Solo writes a minimal file with the project name; after that, the **Save to YML** option becomes available for local commands.

## Remove a command

1. Stop the command if it's running — the delete option is disabled while a command is running.
2. Right-click the command in the sidebar and choose **Delete command**.
3. Confirm if prompted (Solo asks before removing a command that's saved in `solo.yml`).

Deleting a local command removes it from Solo's local state. Deleting a command saved in `solo.yml` removes that command from `solo.yml`, records the synced file state, and then removes the local entry.

If you want to keep a command locally but stop tracking it in `solo.yml`, use **Make local** in the command settings instead of deleting it.

## Notes

- Only command processes can be saved to `solo.yml`; terminals and agents stay local process rows.
- File-based commands (from `solo.yml`) and locally-created commands behave differently during sync. A synced `solo.yml` can add, update, rename, or remove command rows.
- Trust rules can block newly introduced file-based commands from running until you approve them. See [Trust and security](./trust-security.md).

---

Are you a human? Read this doc on the web: https://soloterm.com/docs/commands/adding-removing
