@@ -130,79 +130,6 @@ LOG_LEVEL=5 ccusage daily --debug
130130LOG_LEVEL=0 ccusage monthly --json | python analyze.py
131131```
132132
133- ## CCUSAGE_PROJECT_ALIASES
134-
135- Configure custom display names for project directories. This is useful for replacing cryptic directory names with human-readable aliases.
136-
137- ### Format
138-
139- Use comma-separated ` raw-name=alias ` pairs:
140-
141- ``` bash
142- export CCUSAGE_PROJECT_ALIASES=" long-project-name=Short Name,uuid-project=My Project"
143- ```
144-
145- ### Examples
146-
147- #### UUID Projects
148-
149- Replace cryptic UUIDs with readable names:
150-
151- ``` bash
152- # Without aliases
153- ccusage daily --instances
154- # Shows: a2cd99ed-a586-4fe4-8f59-b0026409ec09
155-
156- # With aliases
157- export CCUSAGE_PROJECT_ALIASES=" a2cd99ed-a586-4fe4-8f59-b0026409ec09=Production API"
158- ccusage daily --instances
159- # Shows: Production API
160- ```
161-
162- #### Long Directory Names
163-
164- Shorten verbose directory names for better display:
165-
166- ``` bash
167- export CCUSAGE_PROJECT_ALIASES=" -Users-john-Development-my-app=My App"
168- ccusage daily --instances
169- ```
170-
171- #### Multiple Projects
172-
173- Set aliases for multiple projects:
174-
175- ``` bash
176- export CCUSAGE_PROJECT_ALIASES=" project1=Frontend,project2=Backend,project3=Database"
177- ccusage session
178- ```
179-
180- ### Automatic Formatting
181-
182- ccusage automatically formats complex project names even without aliases:
183-
184- ** Automatic Cleanup:**
185- - Strips common directory prefixes
186- - Shortens long UUIDs to last two segments
187- - Extracts meaningful names from complex paths
188-
189- ** Examples:**
190- ```
191- # Original → Formatted
192- -Users-phaedrus-Development-adminifi-edugakko-api--feature-ticket-002-configure-dependabot
193- → configure-dependabot
194-
195- a2cd99ed-a586-4fe4-8f59-b0026409ec09
196- → 8f59-b0026409ec09
197-
198- /Users/john/Development/my-app
199- → my-app
200- ```
201-
202- ** Priority Order:**
203- 1 . Custom aliases (via ` CCUSAGE_PROJECT_ALIASES ` )
204- 2 . Automatic formatting
205- 3 . Original name (fallback)
206133
207134## Additional Environment Variables
208135
@@ -255,31 +182,27 @@ Add to your shell configuration file:
255182``` bash
256183export CLAUDE_CONFIG_DIR=" $HOME /.config/claude"
257184export LOG_LEVEL=3
258- export CCUSAGE_PROJECT_ALIASES=" project1=MyApp,project2=API"
259185```
260186
261187#### Zsh (~ /.zshrc)
262188
263189``` zsh
264190export CLAUDE_CONFIG_DIR=" $HOME /.config/claude"
265191export LOG_LEVEL=3
266- export CCUSAGE_PROJECT_ALIASES=" project1=MyApp,project2=API"
267192```
268193
269194#### Fish (~ /.config/fish/config.fish)
270195
271196``` fish
272197set -x CLAUDE_CONFIG_DIR "$HOME/.config/claude"
273198set -x LOG_LEVEL 3
274- set -x CCUSAGE_PROJECT_ALIASES "project1=MyApp,project2=API"
275199```
276200
277201#### PowerShell (Profile.ps1)
278202
279203``` powershell
280204$env:CLAUDE_CONFIG_DIR = "$env:USERPROFILE\.config\claude"
281205$env:LOG_LEVEL = "3"
282- $env:CCUSAGE_PROJECT_ALIASES = "project1=MyApp,project2=API"
283206```
284207
285208## Precedence
0 commit comments