Metadata-Version: 2.4
Name: pygitcode
Version: 0.1.3
Summary: A CLI tool for GitCode (api.gitcode.com), modeled after GitHub CLI.
Author-email: codeasier <825770651@qq.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/codeasier/gitcode-cli
Project-URL: Documentation, https://github.com/codeasier/gitcode-cli#readme
Project-URL: Repository, https://github.com/codeasier/gitcode-cli.git
Project-URL: Issues, https://github.com/codeasier/gitcode-cli/issues
Keywords: gitcode,cli,git,api,vcs,developer-tools
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.24
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: pytest-mock>=3.14; extra == "dev"
Requires-Dist: respx>=0.21; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: basedpyright>=1.19; extra == "dev"
Requires-Dist: pre-commit>=3.0; extra == "dev"
Dynamic: license-file

# pygitcode

> A CLI tool for [GitCode](https://gitcode.com/) (`api.gitcode.com`), modeled after GitHub CLI (`gh`).

[![PyPI](https://img.shields.io/pypi/v/pygitcode)](https://pypi.org/project/pygitcode/)
[![Python](https://img.shields.io/pypi/pyversions/pygitcode)](https://pypi.org/project/pygitcode/)
[![License](https://img.shields.io/pypi/l/pygitcode)](https://github.com/codeasier/gitcode-cli/blob/main/LICENSE)

English | [中文](README.zh-CN.md)

For agent-assisted setup, usage, upgrades, or troubleshooting, read [docs/en/USING_WITH_AGENT.md](docs/en/USING_WITH_AGENT.md) first.

## Installation

```bash
pip install pygitcode
```

This exposes both `gc` and `gitcode` commands in your shell.

## Quick Start

If you already know GitHub CLI (`gh`), you can start with the same familiar flows:

```bash
gc auth login
gc issue list
gc issue view 42
gc pr list
gc pr create --fill
gc pr merge 42 --squash
```

Use `gitcode` instead of `gc` on Windows PowerShell because `gc` is a built-in alias for `Get-Content`.

## Documentation

- [Documentation index](docs/en/index.md)
- [Development guide](docs/en/development.md)
- [Compatibility notes](docs/en/gh-compatibility.md)

## Repository Selection

Commands operate on the current Git repository by default. You can also select a repository explicitly:

```bash
gc issue list -R owner/repo
gc pr list -R owner/repo
```

## Authentication

`gc` resolves tokens in this order:

1. `--token` option
2. `GC_TOKEN` environment variable
3. `~/.config/gc/config.json`, written by `gc auth login`

Useful commands:

```bash
gc auth login
gc auth status
gc auth token
gc auth logout
```

## License

MIT
