跳到正文
cccskills
免费在 GitHub 公开

typer

Build Python command-line applications with Typer by looking up commands, arguments, options, callbacks, help output, and shell completion. The reference also explains how to test and package an app, and how Typer converts its definitions for Click.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Use when building CLI applications with fastapi/typer — creating commands, defining CLI arguments and options, type-hint-driven parameter parsing, callbacks, context, help customization, shell completion, testing, packaging, or Typer internals. Triggers on: "typer", "typer.run", "typer.Typer", "typer app", "typer command", "typer argument", "typer option", "typer callback", "typer context", "Annotated", "typer.Argument", "typer.Option", "typer.Context", "CliRunner", "add_typer", "rich_markup_mode", "typer completion", "typer autocompletion", "typer echo", "typer test", "typer package", "typer click", "get_command".

carapace-sh/carapace-bin星标 2,000(GitHub 2,000 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • Creating commands and subcommands
  • Defining typed arguments and options
  • Customizing help text and shell completion
  • Testing or packaging a Typer app

包含的文件(10)

  • SKILL.md5.1 KB
  • references/commands.md6.4 KB
  • references/completion.md4.3 KB
  • references/context.md4.9 KB
  • references/help-output.md4.5 KB
  • references/internals.md7.4 KB
  • references/package.md2.8 KB
  • references/parameter-types.md5.6 KB
  • references/parameters.md6.9 KB
  • references/testing.md3.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Typer CLI Application Reference

Reference for building CLI applications with typer. Covers the public API, type-driven parameter declaration, and how Typer wraps Click internally.

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
Typer, typer.run, app, @app.command, @app.callback, add_typer, subcommand, group, one or multiple commands, TyperInfo, CommandInfo, suggest_commands, invoke_without_commandreferences/commands.md
typer.Argument, typer.Option, Annotated, default value style, Ellipsis, required, optional, envvar, prompt, confirmation_prompt, short name, metavar, show_default, help, OptionInfo, ArgumentInfo, ParamMetareferences/parameters.md
type conversion, parameter type, str, int, float, bool, Enum, Literal, choices, case_sensitive, FileText, FileTextWrite, FileBinaryRead, FileBinaryWrite, pathlib.Path, exists, min, max, clamp, count, DateTime, UUID, list, tuplereferences/parameter-types.md
typer.Context, ctx, CallbackParam, invoked_subcommand, resilient_parsing, allow_extra_args, ignore_unknown_options, find_root, find_object, ensure_object, fail, abort, exit, get_parameter_sourcereferences/context.md
help, docstring, rich, rich_markup_mode, rich_help_panel, markdown help, deprecated, epilog, printing, echo, style, secho, stderr, rich markup, suggest_commandsreferences/help-output.md
completion, shell completion, install-completion, show-completion, autocompletion, incomplete, shellingham, custom completion, completion functionreferences/completion.md
testing, pytest, CliRunner, Result, invoke, exit_code, input, isolated filesystemreferences/testing.md
package, pyproject.toml, project.scripts, wheel, python -m, main.py, publish, docs generationreferences/package.md
internals, source code, main.py, core.py, models.py, utils.py, _click, vendored click, get_command, get_group_from_info, get_command_from_info, get_callback, TyperGroup, TyperCommand, TyperOption, TyperArgument, DefaultPlaceholder, rich_utilsreferences/internals.md

Quick Guide

Cross-Project References

  • For the completion-aware pflag/cobra ecosystem used in this repo, see the cobra skill (in this repo, skills/cobra/). Typer is Click-based, not cobra-based; Typer's own internals are covered in references/internals.md.
  • For FastAPI itself, Typer's design mirrors it (dependency injection, declarative type hints) but there is no FastAPI skill here.

Note

Typer versions covered: 0.12+ through 0.27.x. Since v0.26.0 Click is vendored inside typer/_click/, so no external Click dependency exists at runtime (see references/internals.md).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

brew

免费

Use this reference to manage software with Homebrew on macOS or Linux, understand formulas and casks, maintain Brewfiles and services, troubleshoot installations, or work on formula and cask development tasks.

中文简介正在准备中。当前显示英语简介。

  • Installing, updating, or removing Homebrew packages
  • Managing services and software lists with a Brewfile
  • Writing or updating a formula or cask
carapace-sh/carapace-bin20002026年10月26日 更新

bubbletea

免费

Use this reference to build and maintain terminal user interfaces in Go with Bubble Tea. It explains the Model/Update/View cycle, commands and messages, input, rendering, program lifecycle, tests, component composition, and patterns for larger applications.

中文简介正在准备中。当前显示英语简介。

  • Building a Bubble Tea terminal interface
  • Handling keyboard, mouse, and window resize events
  • Running asynchronous work through commands and messages
carapace-sh/carapace-bin20002026年10月26日 更新

bun

免费

Use this reference for JavaScript and TypeScript development with Bun. It explains CLI commands, dependency and lockfile management, testing, bundling code, runtime APIs for files and servers, the Bun shell, configuration, and environment variables.

中文简介正在准备中。当前显示英语简介。

  • Installing and managing project dependencies
  • Running tests or building a bundle with Bun
  • Starting a server or reading and writing files
carapace-sh/carapace-bin20002026年10月26日 更新

but

免费

Use this reference to manage Git work with the GitButler CLI (`but`), including virtual and stacked branches, assigning changes, editing commits, resolving conflicts, and creating pull requests. It also covers the workspace, operation history, interactive TUI, configuration, and AI agent setup.

中文简介正在准备中。当前显示英语简介。

  • Working on parallel or stacked branches
  • Assigning file changes to a virtual branch
  • Amending, squashing, or rewording commits
carapace-sh/carapace-bin20002026年10月26日 更新

carapace

免费

Build and maintain carapace shell completions for command-line tools. The reference covers YAML specs, custom completion actions, shell setup, DSL-aware parsing, MCP use, and documentation for suggested values.

中文简介正在准备中。当前显示英语简介。

  • Adding shell completion to a CLI
  • Writing a YAML spec or custom completion action
  • Generating completion documentation for values
carapace-sh/carapace-bin20002026年10月26日 更新

cargo

免费

Use this reference to work with Cargo, Rust’s package manager and build tool. It explains project manifests, dependencies, features, workspaces, build profiles, configuration, registries, publishing, and commands for building, testing, and inspecting projects.

中文简介正在准备中。当前显示英语简介。

  • Setting up dependencies in Cargo.toml
  • Understanding features and workspace settings
  • Choosing Cargo commands to build or test a project
carapace-sh/carapace-bin20002026年10月26日 更新

查看 carapace-sh 的全部技能

报告此技能的问题