@lyalindotcom/h
v0.1.0
Published
A machine-aware AI command-line copilot powered by AI SDK providers.
Downloads
24
Maintainers
Readme
@lyalindotcom/h
h is an intelligent command-line copilot. It can inspect a specific CLI's help output, or answer a general shell question by checking the local machine for relevant installed tools before asking an AI SDK model.
Install
npm install -g @lyalindotcom/h
h configureFor local development:
npm install
npm run build
npm linkUsage
h configure
h firebase
h firebase how do i login
h -c firebase -r "i want to make sure im logged in for firebase deploy"
h -c "firebase deploy" -r "make sure i am logged in first"
h how do i pull a repo down from github?
h --web how do i install the latest github cli?
h --no-web how do i check what node version i have?The MVP is explain-only. It suggests task commands but does not execute them.
Modes
Target CLI mode:
h firebase how do i loginIf firebase is installed, h inspects firebase --help and likely subcommand help before answering.
General task mode:
h how do i pull a repo down from github?If no installed target CLI is detected, h treats the input as a command-line task. It checks bounded local context such as platform, shell, candidate tools like git and gh, likely package managers, and read-only Git repo state when relevant.
Web and docs
For Google/Gemini models, h can use Gemini Search grounding and URL Context through the AI SDK.
h --web how do i install the latest github cli?
h --no-web firebase how do i login
h --sources how do i pull a repo down from github?Web mode defaults to auto: local help and machine context first, then web/docs grounding when the request likely needs current docs, install guidance, or external-service details.
When h is thinking in a terminal, it shows short progress details under the spinner. For grounded requests, this includes whether web/docs grounding is enabled, which Gemini tools are available, tool-call callbacks when the AI SDK exposes them, and how many sources were returned.
Providers
Default provider:
google / gemini-3.5-flashSupported provider IDs:
google
openai
anthropicEnvironment variables override stored keys:
GOOGLE_GENERATIVE_AI_API_KEY
OPENAI_API_KEY
ANTHROPIC_API_KEYPublishing
npm login
npm run check
npm publishFor later releases, use one of the versioned release scripts so npm gets a new version every time:
npm run release:patch
npm run release:minor
npm run release:majorprepublishOnly also checks the registry and blocks publishing if the current package version already exists.
