Introduction
Are you familiar with Amazon Q Developer CLI? It's an AI tool where you type q
in the terminal and develop while chatting.
When you install this, you also get the Command line assistance features that make terminal command operations more convenient. As I would later discover, this functionality appears to have originated from a tool called Fig. Searching for Fig reveals various articles from its earlier days when it was gaining attention.
When I ran q --help-all
, I found a theme
subcommand. What's this theme thing? This is the record of my journey of investigation, exploration, and challenge.
My theme is, of course, "🔥Toukon🔥" (the spirit of self-mastery).
Help Me
First, I checked the help:
$ q theme --help
Get or set theme
Usage: q theme [OPTIONS] [THEME]
Arguments:
[THEME]
Options:
--list
--folder
-v, --verbose... Increase logging verbosity
-h, --help Print help
Pretty sparse. I couldn't understand much. The Amazon Q CLI command reference wasn't very helpful either.
Chapter 1: The Moment of Discovery
Running q theme --list
displayed what appeared to be theme names. q theme --folder
showed /Applications/Amazon Q.app/Contents/Resources/themes
on my macOS. When I ls
ed the directory, I found .json
files that matched the names I saw with q theme --list
.
I tried switching to the palenight
theme:
q theme palenight
› Switching to theme 'palenight' by Jamie Weavis
🐦 @jamieweavis
💻 github.com/jamieweavis
It displayed the author's name, GitHub account, and Twitter handle.
I thought, "Maybe I could get my theme listed here too?"
Chapter 2: The Fig Legacy
As I investigated further, I discovered the existence of a project called "Fig" as the predecessor to the Command line assistance features functionality in Amazon Q CLI.
The Fig GitHub repository is publicly archived, and the official page states "Fig has been sunset, migrate to Amazon Q." The archived repository's guidance indicated it was available through amazon-q-developer-cli, so I decided to analyze amazon-q-developer-cli first.
Chapter 3: Dialogue with Amazon Q
Let's analyze amazon-q-developer-cli.
Ironically, I had Amazon Q CLI itself analyze the Amazon Q CLI code.
"Can you analyze yourself?"
A strange collaboration with AI began.
However, the investigation proved difficult. I couldn't find traces of Fig. The path to the theme
subcommand seemed distant.
Chapter 4: Discovery of the Autocomplete Repository
It was a treacherous path. A thorny road. But as Inoki-san said, I walked with a smile.
Amazon Q CLI worked hard for me.
In amazon-q-developer-cli/crates/chat-cli/src/cli/feed.json, I found numerous references to the amazon-q-developer-cli-autocomplete repository.
From here, it was smooth sailing. Finally, I found it! Inside amazon-q-developer-cli-autocomplete.
The hidden truth on line 718 of build.py:
run_cmd(["git", "clone", "https://github.com/withfig/themes.git", theme_repo])
I discovered that it copies from the repository that collects Fig themes.
The path to inject Toukon into the heart of global software became clear.
Chapter 5: Implementation of Toukon
I conveyed Inoki-san's teaching that "Toukon is about overcoming oneself and polishing one's soul through struggle" to Amazon Q CLI, and had it create a theme (toukon.json
) that expresses the burning spirit of self-mastery based on the black of Strong Style.
{
"$schema": "../schema.json",
"author": {
"name": "Awesome YAMAUCHI",
"twitter": "@torifukukaiou",
"github": "TORIFUKUKaiou"
},
"version": "1.0",
"theme": {
"textColor": "#FFD700",
"backgroundColor": "#000000",
"matchBackgroundColor": "#CC0000",
"selection": {
"textColor": "#FFFFFF",
"backgroundColor": "#CC0000",
"matchBackgroundColor": "#FFD700"
},
"description": {
"textColor": "#CCCCCC",
"borderColor": "#CC0000",
"backgroundColor": "#1A1A1A"
}
}
}
For testing purposes, I placed the file at "/Applications/Amazon Q.app/Contents/Resources/themes/toukon.json"
. When writing through the terminal, macOS requires permission to modify the app. Since the setting location sometimes changes with macOS versions, I'll mention that my version is 15.6. Here's a screenshot:
Well, it feels somewhat dangerous and radical, but "If you doubt, there is no path". "Step forward and that step becomes the path, that step becomes the path". I went without hesitation! Going forward, I understood! Inoki-san!!!
cat > "/Applications/Amazon Q.app/Contents/Resources/themes/toukon.json" << 'EOF'
{
"$schema": "../schema.json",
"author": {
"name": "Awesome YAMAUCHI",
"twitter": "@torifukukaiou",
"github": "TORIFUKUKaiou"
},
"version": "1.0",
"theme": {
"textColor": "#FFD700",
"backgroundColor": "#000000",
"matchBackgroundColor": "#CC0000",
"selection": {
"textColor": "#FFFFFF",
"backgroundColor": "#CC0000",
"matchBackgroundColor": "#FFD700"
},
"description": {
"textColor": "#CCCCCC",
"borderColor": "#CC0000",
"backgroundColor": "#1A1A1A"
}
}
}
EOF
Finally, q theme toukon
works! I injected Toukon into my local machine's Amazon Q CLI - Command line assistance features. It's the only one in the world. Unique. One and only.
Then I sent a pull request to the main repository.
Epilogue: Injecting Toukon into the World
I submitted Pull Request #37.
If merged, developers worldwide can experience Toukon. If accepted, it should ride the build flow at some release timing, so without doing dangerous and radical things like I did, everyone can achieve Toukon injection by simply running q theme toukon
. There are abandoned theme pull requests waiting in queue, so I think it will be difficult to get merged.
This was the story of using Amazon Q Developer CLI to analyze [Amazon Q Developer CLI and ultimately inject Toukon into Amazon Q Developer CLI.
Technical Discoveries Summary
Here are the key technical points discovered through this adventure:
- Fig's Legacy: Command line assistance features inherit technology from the Fig project
- Theme System: Automatically clones themes from the withfig/themes repository during build time !?
- Theme File Structure: JSON format containing schema, author information, and color definitions
- Contribution Method: New themes can be added via pull requests to the withfig/themes repository
Toukon is about overcoming oneself. This technical exploration was also a struggle against the unknown - a battle with oneself.
I hope this article serves as a reference for developers using Amazon Q CLI. And I hope that someday, developers worldwide will be able to experience Toukon by running q theme toukon
.
Top comments (0)