Repository navigation
feat(config): named profiles in ~/.lich/profiles #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
c540421
wiki: log merges of #115 #127 #137 #139 #141 #142 #143
claude 5a6efcd
wiki: decision models and Ollama model research (#148)
claude aaa033c
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 97992d7
wiki: Hermes model roles, memory embedders and Jev plugins (#148, #149)
claude f1a3427
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude af2d08f
docs: default local Ollama to qwen3:8b and document Ollama cloud (#148)
claude 9c6f11b
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 45f9ef1
wiki: fix Hermes Jev plugin count and update providers after #152
claude 84e91ab
feat(config): per-role provider chains via models.chat and models.com…
claude 9fd71b7
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude c00a4c7
test, docs: cover models.compress through Agent; clarify omitted-role…
claude b5a20f1
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude b054cc7
feat(plugins): entry settings, host model access and before_llm_call …
claude d6b712a
fix(plugins): deep-copy hook messages, honor run abort in models.chat…
claude ab5df46
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 2b01b6d
wiki: ingest Ollama System One/Clef check; record model roles and plu…
claude e010ef8
wiki: index one-liners match model roles and plugin host features
claude 4640db2
wiki: bump index updated date
claude 98a2c2b
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude b8266bc
feat(examples): decision_lane plugin for game_bridge action selection
claude bab4850
fix(decision_lane): zero off-criteria answers, require numeric thresh…
claude e0237cc
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude c59f5d1
wiki: record the decision_lane prototype (#159)
claude ca1c05f
wiki: decision_lane egress mentions the Bearer key
claude dcbb9e6
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 2074964
fix(agent): tools_enabled filters plugin tools; guard hooks fail clos…
claude 4f97ea2
fix(loop): emit tool_call_end for last-turn skipped calls so transcri…
claude 1b2d4d9
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 4840336
wiki: record #161 (plugin-tool allowlist, fail-closed guard hooks, la…
claude 0b3d485
wiki: move the #161 fixed note out of the open-holes list
claude d7e1e95
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 0930c7d
fix: http_request status, terminal_timeout_ms, .. path guard, OpenAI …
claude 09fc444
fix(openai): treat a null tool-call id as missing; correct http_reque…
claude 1294e6a
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 07d0d3b
docs: webhook binds loopback by default; drop stale version from over…
claude 0608068
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 16c4bdb
refactor(providers): share HTTP/error helpers in providers/http.ts (#…
claude 53962b9
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude fe394bd
fix: Ctrl+C/Esc cancel, atomic config update, test tmp cleanup (#133)
claude 84f62a4
fix: on cancel, drop the unanswered user line and do not reprint the …
claude 3cfddb1
fix: keep this turn's reply when a cancel lands during tools
claude 8c5fe08
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude b941191
wiki: map #113 phase children and related issues
claude 39aade9
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 4c8b180
feat(config): global ~/.lich/config.json merged under the project con…
claude dc815f3
fix(config): read the legacy user config only when ~/.lich/config.jso…
claude 36f8f87
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude 146619b
feat(config): lich init --global and a "save as global" wizard step (…
claude 2faf90c
fix(wizard): write the config once, plugins included, when work_dir i…
claude eff0ea1
fix(wizard): store absolute plugin paths when writing ~/.lich/config.…
claude 558e3d1
Merge remote-tracking branch 'origin/main' into claude/open-issues-pr…
claude eaadb01
feat(config): named profiles in ~/.lich/profiles (#117)
claude ae7e9d8
fix(profiles): profile over the home config, stable errors, guard lis…
claude 2d64bbf
fix(profiles): keep the legacy base at home; disk_usage skips denied …
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Profiles | ||
|
|
||
| A profile is a named config, such as `coder` or `bard`, that you can switch between without editing project files. Profiles live under `~/.lich/profiles/`, next to the global config. | ||
|
|
||
| ``` | ||
| ~/.lich/ | ||
| ├── config.json # global defaults (see the CLI reference: Global config) | ||
| └── profiles/ | ||
| ├── coder.json # any config keys: model, agent_name, max_turns, plugins, ... | ||
| └── coder.md # optional "soul": becomes the system prompt | ||
| ``` | ||
|
|
||
| ## Layers | ||
|
|
||
| A run merges up to three files, each overriding the one before it key by key: | ||
|
|
||
| 1. `~/.lich/config.json` (global) | ||
| 2. `~/.lich/profiles/<name>.json` (the selected profile) | ||
| 3. `<work_dir>/.lich/config.json` (project) | ||
|
|
||
| The merge rules are the same as for the global config. It is a shallow merge. A later `providers` array replaces the earlier one and drops the earlier `models` unless the later layer sets its own. `work_dir` and `session_dir` in a profile are ignored. Relative `plugins` paths in a profile resolve against `~/.lich/profiles/`. | ||
|
|
||
| A profile only needs the keys that differ from your global config. For example, a profile that just changes the model: | ||
|
|
||
| ```json | ||
| { "agent_name": "coder", "providers": [{ "kind": "ollama", "name": "main", "model": "qwen3:8b" }] } | ||
| ``` | ||
|
|
||
| `--config <path>` still replaces every layer. It cannot be combined with `--profile`, and `LICH_PROFILE` is ignored when it is given. | ||
|
|
||
| ## The soul file | ||
|
|
||
| When `<name>.md` exists and is not blank, its contents become the profile's `system_prompt`, replacing any `system_prompt` in `<name>.json`. A project `system_prompt` still wins over it. A profile can be only a soul file, with no JSON. | ||
|
|
||
| ## Choosing a profile | ||
|
|
||
| The first of these that is set wins: | ||
|
|
||
| 1. `--profile <name>` on the command line | ||
| 2. the `LICH_PROFILE` environment variable | ||
| 3. a `profile` key in the project `.lich/config.json` | ||
| 4. the default profile: a `profile` key in `~/.lich/config.json`, set by `lich profile use` | ||
|
|
||
| A named profile that does not exist is an error (`profile not found: <name>`). Profile names use lowercase letters, digits, `-` and `_`. When `--profile` or `LICH_PROFILE` is set, bare `lich` skips the setup wizard. | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | Effect | | ||
| | --- | --- | | ||
| | `lich profile list` | List profiles. `*` marks the default; `(soul)` marks a profile with a `.md` file. | | ||
| | `lich profile show <name>` | Print the profile's JSON and its soul file's path and length. | | ||
| | `lich profile create <name>` | Run the setup wizard and write `~/.lich/profiles/<name>.json`. Needs a TTY; never overwrites. | | ||
| | `lich profile use <name>` | Make `<name>` the default by setting `profile` in `~/.lich/config.json` (other keys are kept). | | ||
|
|
||
| To clear the default, remove the `profile` key from `~/.lich/config.json`. | ||
|
|
||
| ## Safety | ||
|
|
||
| File tools cannot read or write `.lich/profiles/` under the working directory, just as they cannot touch `.lich/config.json`. When the working directory is your home directory, these are your global identity files. Profiles hold env var *names* for keys (`api_key_env`, `token_envs`), never the secrets themselves. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.