Metadata-Version: 2.4
Name: timecho_ai
Version: 0.2.4
Summary: Python CLI SDK for Timecho AI API
License: Apache License
                                    Version 2.0, January 2004
                                 http://www.apache.org/licenses/
         
            TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
         
            1. Definitions.
         
               "License" shall mean the terms and conditions for use, reproduction,
               and distribution as defined by Sections 1 through 9 of this document.
         
               "Licensor" shall mean the copyright owner or entity authorized by
               the copyright owner that is granting the License.
         
               "Legal Entity" shall mean the union of the acting entity and all
               other entities that control, are controlled by, or are under common
               control with that entity. For the purposes of this definition,
               "control" means (i) the power, direct or indirect, to cause the
               direction or management of such entity, whether by contract or
               otherwise, or (ii) ownership of fifty percent (50%) or more of the
               outstanding shares, or (iii) beneficial ownership of such entity.
         
               "You" (or "Your") shall mean an individual or Legal Entity
               exercising permissions granted by this License.
         
               "Source" form shall mean the preferred form for making modifications,
               including but not limited to software source code, documentation
               source, and configuration files.
         
               "Object" form shall mean any form resulting from mechanical
               transformation or translation of a Source form, including but
               not limited to compiled object code, generated documentation,
               and conversions to other media types.
         
               "Work" shall mean the work of authorship, whether in Source or
               Object form, made available under the License, as indicated by a
               copyright notice that is included in or attached to the work
               (an example is provided in the Appendix below).
         
               "Derivative Works" shall mean any work, whether in Source or Object
               form, that is based on (or derived from) the Work and for which the
               editorial revisions, annotations, elaborations, or other modifications
               represent, as a whole, an original work of authorship. For the purposes
               of this License, Derivative Works shall not include works that remain
               separable from, or merely link (or bind by name) to the interfaces of,
               the Work and Derivative Works thereof.
         
               "Contribution" shall mean any work of authorship, including
               the original version of the Work and any modifications or additions
               to that Work or Derivative Works thereof, that is intentionally
               submitted to Licensor for inclusion in the Work by the copyright owner
               or by an individual or Legal Entity authorized to submit on behalf of
               the copyright owner. For the purposes of this definition, "submitted"
               means any form of electronic, verbal, or written communication sent
               to the Licensor or its representatives, including but not limited to
               communication on electronic mailing lists, source code control systems,
               and issue tracking systems that are managed by, or on behalf of, the
               Licensor for the purpose of discussing and improving the Work, but
               excluding communication that is conspicuously marked or otherwise
               designated in writing by the copyright owner as "Not a Contribution."
         
               "Contributor" shall mean Licensor and any individual or Legal Entity
               on behalf of whom a Contribution has been received by Licensor and
               subsequently incorporated within the Work.
         
            2. Grant of Copyright License. Subject to the terms and conditions of
               this License, each Contributor hereby grants to You a perpetual,
               worldwide, non-exclusive, no-charge, royalty-free, irrevocable
               copyright license to reproduce, prepare Derivative Works of,
               publicly display, publicly perform, sublicense, and distribute the
               Work and such Derivative Works in Source or Object form.
         
            3. Grant of Patent License. Subject to the terms and conditions of
               this License, each Contributor hereby grants to You a perpetual,
               worldwide, non-exclusive, no-charge, royalty-free, irrevocable
               (except as stated in this section) patent license to make, have made,
               use, offer to sell, sell, import, and otherwise transfer the Work,
               where such license applies only to those patent claims licensable
               by such Contributor that are necessarily infringed by their
               Contribution(s) alone or by combination of their Contribution(s)
               with the Work to which such Contribution(s) was submitted. If You
               institute patent litigation against any entity (including a
               cross-claim or counterclaim in a lawsuit) alleging that the Work
               or a Contribution incorporated within the Work constitutes direct
               or contributory patent infringement, then any patent licenses
               granted to You under this License for that Work shall terminate
               as of the date such litigation is filed.
         
            4. Redistribution. You may reproduce and distribute copies of the
               Work or Derivative Works thereof in any medium, with or without
               modifications, and in Source or Object form, provided that You
               meet the following conditions:
         
               (a) You must give any other recipients of the Work or
                   Derivative Works a copy of this License; and
         
               (b) You must cause any modified files to carry prominent notices
                   stating that You changed the files; and
         
               (c) You must retain, in the Source form of any Derivative Works
                   that You distribute, all copyright, patent, trademark, and
                   attribution notices from the Source form of the Work,
                   excluding those notices that do not pertain to any part of
                   the Derivative Works; and
         
               (d) If the Work includes a "NOTICE" text file as part of its
                   distribution, then any Derivative Works that You distribute must
                   include a readable copy of the attribution notices contained
                   within such NOTICE file, excluding those notices that do not
                   pertain to any part of the Derivative Works, in at least one
                   of the following places: within a NOTICE text file distributed
                   as part of the Derivative Works; within the Source form or
                   documentation, if provided along with the Derivative Works; or,
                   within a display generated by the Derivative Works, if and
                   wherever such third-party notices normally appear. The contents
                   of the NOTICE file are for informational purposes only and
                   do not modify the License. You may add Your own attribution
                   notices within Derivative Works that You distribute, alongside
                   or as an addendum to the NOTICE text from the Work, provided
                   that such additional attribution notices cannot be construed
                   as modifying the License.
         
               You may add Your own copyright statement to Your modifications and
               may provide additional or different license terms and conditions
               for use, reproduction, or distribution of Your modifications, or
               for any such Derivative Works as a whole, provided Your use,
               reproduction, and distribution of the Work otherwise complies with
               the conditions stated in this License.
         
            5. Submission of Contributions. Unless You explicitly state otherwise,
               any Contribution intentionally submitted for inclusion in the Work
               by You to the Licensor shall be under the terms and conditions of
               this License, without any additional terms or conditions.
               Notwithstanding the above, nothing herein shall supersede or modify
               the terms of any separate license agreement you may have executed
               with Licensor regarding such Contributions.
         
            6. Trademarks. This License does not grant permission to use the trade
               names, trademarks, service marks, or product names of the Licensor,
               except as required for reasonable and customary use in describing the
               origin of the Work and reproducing the content of the NOTICE file.
         
            7. Disclaimer of Warranty. Unless required by applicable law or
               agreed to in writing, Licensor provides the Work (and each
               Contributor provides its Contributions) on an "AS IS" BASIS,
               WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
               implied, including, without limitation, any warranties or conditions
               of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
               PARTICULAR PURPOSE. You are solely responsible for determining the
               appropriateness of using or redistributing the Work and assume any
               risks associated with Your exercise of permissions under this License.
         
            8. Limitation of Liability. In no event and under no legal theory,
               whether in tort (including negligence), contract, or otherwise,
               unless required by applicable law (such as deliberate and grossly
               negligent acts) or agreed to in writing, shall any Contributor be
               liable to You for damages, including any direct, indirect, special,
               incidental, or consequential damages of any character arising as a
               result of this License or out of the use or inability to use the
               Work (including but not limited to damages for loss of goodwill,
               work stoppage, computer failure or malfunction, or any and all
               other commercial damages or losses), even if such Contributor
               has been advised of the possibility of such damages.
         
            9. Accepting Warranty or Additional Liability. While redistributing
               the Work or Derivative Works thereof, You may choose to offer,
               and charge a fee for, acceptance of support, warranty, indemnity,
               or other liability obligations and/or rights consistent with this
               License. However, in accepting such obligations, You may act only
               on Your own behalf and on Your sole responsibility, not on behalf
               of any other Contributor, and only if You agree to indemnify,
               defend, and hold each Contributor harmless for any liability
               incurred by, or claims asserted against, such Contributor by reason
               of your accepting any such warranty or additional liability.
         
            END OF TERMS AND CONDITIONS
         
            APPENDIX: How to apply the Apache License to your work.
         
               To apply the Apache License to your work, attach the following
               boilerplate notice, with the fields enclosed by brackets "[]"
               replaced with your own identifying information. (Don't include
               the brackets!)  The text should be enclosed in the appropriate
               comment syntax for the file format. We also recommend that a
               file or class name and description of purpose be included on the
               same "printed page" as the copyright notice for easier
               identification within third-party archives.
         
            Copyright [yyyy] [name of copyright owner]
         
            Licensed under the Apache License, Version 2.0 (the "License");
            you may not use this file except in compliance with the License.
            You may obtain a copy of the License at
         
                http://www.apache.org/licenses/LICENSE-2.0
         
            Unless required by applicable law or agreed to in writing, software
            distributed under the License is distributed on an "AS IS" BASIS,
            WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            See the License for the specific language governing permissions and
            limitations under the License.
License-File: LICENSE
Author: YongzaoDan
Author-email: yongzao@apache.org
Requires-Python: >=3.10
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: all
Provides-Extra: cli
Provides-Extra: dev
Provides-Extra: mcp
Provides-Extra: plot
Requires-Dist: aiohttp (>=3.7.0)
Requires-Dist: black (>=23.0.0) ; extra == "dev"
Requires-Dist: build (>=1.0.0) ; extra == "dev"
Requires-Dist: click (>=8.1) ; extra == "all"
Requires-Dist: click (>=8.1) ; extra == "cli"
Requires-Dist: click (>=8.1) ; extra == "dev"
Requires-Dist: click (>=8.1) ; extra == "mcp"
Requires-Dist: isort (>=5.12.0) ; extra == "dev"
Requires-Dist: kaleido ; extra == "all"
Requires-Dist: kaleido ; extra == "dev"
Requires-Dist: kaleido ; extra == "plot"
Requires-Dist: mcp[cli] (>=1.27,<2) ; extra == "all"
Requires-Dist: mcp[cli] (>=1.27,<2) ; extra == "dev"
Requires-Dist: mcp[cli] (>=1.27,<2) ; extra == "mcp"
Requires-Dist: pandas (>=2.0)
Requires-Dist: plotly (>=5) ; extra == "all"
Requires-Dist: plotly (>=5) ; extra == "dev"
Requires-Dist: plotly (>=5) ; extra == "plot"
Requires-Dist: pytest (>=7.0.0) ; extra == "dev"
Requires-Dist: pytest-asyncio (>=0.21.0) ; extra == "dev"
Requires-Dist: requests (>=2.25.0)
Requires-Dist: tabulate (>=0.9) ; extra == "all"
Requires-Dist: tabulate (>=0.9) ; extra == "cli"
Requires-Dist: tabulate (>=0.9) ; extra == "dev"
Requires-Dist: tabulate (>=0.9) ; extra == "mcp"
Requires-Dist: twine (>=4.0.0) ; extra == "dev"
Project-URL: Documentation, https://github.com/TimechoLab/Timecho-AI#readme
Project-URL: Homepage, https://github.com/TimechoLab/Timecho-AI
Project-URL: Issues, https://github.com/TimechoLab/Timecho-AI/issues
Project-URL: Repository, https://github.com/TimechoLab/Timecho-AI
Description-Content-Type: text/markdown

# Timecho AI

[![PyPI version](https://badge.fury.io/py/timecho-ai.svg)](https://pypi.org/project/timecho-ai/)
[![Python](https://img.shields.io/pypi/pyversions/timecho-ai.svg)](https://pypi.org/project/timecho-ai/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

Python SDK for the **Timecho AI** time-series forecasting API. Provides synchronous and asynchronous clients, plus built-in **CLI**, **MCP server**, and agent skill/plugin integration surfaces for Qwen Code, Claude Code, and Codex.

This document has two parts:

- [Part 1 · Using the released SDK](#part-1--using-the-released-sdk) — install from PyPI and use it (most users).
- [Part 2 · Building from source](#part-2--building-from-source) — clone, build, self-check, and publish (contributors).

> Requires Python ≥ 3.10. 中文版：[README_ZH.md](README_ZH.md)。

---

# Part 1 · Using the released SDK

For versions published to PyPI — `pip install` and go.

## Installation

```bash
pip install timecho_ai
```

Optional extras enable the integration surfaces:

```bash
pip install 'timecho_ai[cli]'   # the timecho-ai command-line tool
pip install 'timecho_ai[mcp]'   # the MCP server (timecho-ai-mcp)
pip install 'timecho_ai[plot]'  # forecast plotting (plotly + kaleido)
pip install 'timecho_ai[all]'   # everything above
```

| extra  | dependencies |
|--------|--------------|
| (core) | pandas, requests, aiohttp |
| `cli`  | click, tabulate |
| `mcp`  | click, tabulate, mcp[cli] |
| `plot` | plotly, kaleido |
| `all`  | all of the above |

## Configuration

Configure via constructor parameters or environment variables (constructor wins):

| Parameter | Environment Variable | Default | Description |
|-----------|---------------------|---------|-------------|
| `api_key` | `TIMER_CLIENT_API_KEY` | - | API key for authentication (required) |
| `base_url` | `TIMER_CLIENT_BASE_URL` | `https://ai.timecho.com` | API base URL |
| `timeout` | `TIMER_CLIENT_TIMEOUT` | `30.0` | Request timeout in seconds |

```bash
export TIMER_CLIENT_API_KEY="your-api-key"
```

## Python SDK quick start

### Synchronous client

```python
import pandas as pd
from timecho_ai import TimechoAIClient

# Load your time series data
df = pd.read_csv("your_data.csv")

# Create a client (api_key may be omitted to read it from the environment)
client = TimechoAIClient(api_key="your-api-key")

# Test connectivity
print(client.hello_timer(name="World"))

# Univariate forecast
results = client.forecast(
    targets=df[["time", "OT"]][:2880],
    output_length=720,
)
print(results[0].head())

# Forecast with covariates
results = client.forecast(
    targets=df[["time", "OT"]][:2880],
    history_covs=df[["time", "hufl", "hull", "mufl", "mull", "lufl", "lull"]][:2880],
    future_covs=df[["time", "hufl", "hull", "mufl", "mull", "lufl", "lull"]][2880:3600],
    output_length=720,
)
print(results[0].head())
```

### Asynchronous client

```python
import asyncio
import pandas as pd
from timecho_ai import TimechoAIAsyncClient

async def main():
    df = pd.read_csv("your_data.csv")

    async with TimechoAIAsyncClient(api_key="your-api-key") as client:
        print(await client.hello_timer(name="World"))

        results = await client.forecast(
            targets=df[["time", "OT"]][:2880],
            output_length=720,
        )
        print(results[0].head())

asyncio.run(main())
```

### Forecast API

The `forecast` method accepts the following parameters:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `targets` | `DataFrame` | Yes | Target time series with a `time` column and one or more value columns |
| `history_covs` | `DataFrame` | No | Historical covariates (same length as targets) |
| `future_covs` | `DataFrame` | No | Future covariates (same length as output_length) |
| `model_id` | `str` | No | Model identifier; `auto` (default) routes by input shape |
| `output_length` | `int` | No | Forecast horizon, range [1, 720]. When omitted, the server applies the model's default (Timer-3.5: 272, others: 96) |
| `output_start_time` | `Timestamp` | No | Start time of the forecast output |
| `output_interval` | `str` | No | Time interval of the forecast output |
| `time_col` | `str` | No | Name of the time column (auto-detected if not specified) |
| `auto_adapt` | `bool` | No | Auto-adapt covariate lengths (default: True) |
| `model_params` | `dict` | No | Per-model inference parameters passed through to the server |

Returns a list of `DataFrame`, one per forecast task.

Available models — `auto`, `Timer-3.5`, `Timer-3.0`, `Chronos-2`, `toto2.0`, `timesfm2.5` — and their per-model limits (input/output length, covariate counts) are documented in [doc/forecast_en.md](doc/forecast_en.md), or read `timecho_ai.FORECAST_LIMITS` offline.

## Command line (CLI)

Install the `[cli]` extra (and `[plot]` for `--plot`), then set your API key:

```bash
export TIMER_CLIENT_API_KEY="your-api-key"

timecho-ai hello                      # connectivity/auth smoke test
timecho-ai forecast --input data.csv --target OT --output-length 96 \
    --time-col time --out pred.csv --plot pred.png
```

- `forecast` writes the prediction to `--out` (or stdout); with `--plot` it writes a static PNG by default (opens in any image viewer, no network needed; size is controllable via `--plot-width`/`--plot-height`/`--plot-scale`). Use a `.html` path or `--plot-format html` for an interactive chart (which loads Plotly from a CDN).
- When `--target` is omitted, all non-time columns are forecast (with a warning).
- Connection options `--api-key`/`--base-url`/`--timeout` mirror the `TIMER_CLIENT_*` env vars.
- Exit codes: 0 ok / 2 validation / 3 auth / 4 not found / 5 rate limit / 6 API/server / 7 connection·timeout / 8 missing deps.

## Use in Qwen Code / Claude Code / Codex

Using Timecho AI inside an agent host is two steps: install and register the **MCP server** to expose forecasting to the model, then install the **skill** that orchestrates the model-choice → forecast → plot workflow. Below is the minimal setup per host in **Qwen Code → Claude Code → Codex** order; the full design (extension/plugin marketplaces, update flow, principles) is in [doc/agent_integration_zh.md](doc/agent_integration_zh.md).

Common prerequisites: `pip install 'timecho_ai[all]'` and `export TIMER_CLIENT_API_KEY=your-api-key`. The MCP surface exposes only the `forecast` tool, which returns JSON records and, when a chart is requested, writes a PNG to disk and returns its absolute `plot_path` — open that file to view the chart. The shipped `.mcp.json` / extension manifests read `${TIMER_CLIENT_API_KEY}` from the environment — never inline the key.

### Qwen Code (Alibaba)

```bash
timecho-ai skill --install --target qwen     # ~/.qwen/skills
qwen mcp add timecho-ai --scope user -e TIMER_CLIENT_API_KEY="$TIMER_CLIENT_API_KEY" -- timecho-ai-mcp
```

Note Qwen's stdio entry has no `type` field, and to load `AGENTS.md` into context set `context.fileName` to `["QWEN.md", "AGENTS.md"]`. Verify with `/mcp` and `/skills`. The repo ships a native Qwen extension (`plugins/qwen/`, MCP declared inline); **once open-sourced** it installs in one step via `qwen extensions install https://github.com/TimechoLab/Timecho-AI`.

### Claude Code

The repo is its own Claude Code marketplace + plugin (once open-sourced: `claude plugin marketplace add TimechoLab/Timecho-AI` then `claude plugin install timecho-ai@timecho-ai`). Manual path:

```bash
timecho-ai skill --install --target claude   # ~/.claude/skills
claude mcp add --transport stdio --scope project \
    --env TIMER_CLIENT_API_KEY=your-api-key timecho-ai -- timecho-ai-mcp
```

Verify with `/mcp` inside Claude Code.

### Codex

The repo is also a Codex marketplace + plugin (once open-sourced: `codex plugin marketplace add TimechoLab/Timecho-AI` then `codex plugin add timecho-ai@timecho-ai`). Manual path:

```bash
timecho-ai skill --install --target codex    # ~/.agents/skills + ~/.codex/skills
codex mcp add timecho-ai --env TIMER_CLIENT_API_KEY=your-api-key -- timecho-ai-mcp
```

### Skill & updates

The bundled `timecho-forecast` skill drives the model-choice → forecast → plot workflow over the CLI/MCP surfaces (orchestration only — it never reimplements the SDK). `timecho-ai skill --install` defaults to `--target all`, installing into all three hosts (`~/.claude/skills`, `~/.agents/skills` + `~/.codex/skills`, `~/.qwen/skills`); `--target both` is Claude+Codex only. Restart the host to load it; together with the registered MCP server the skill works inside the host. The CLI and MCP tools surface a "new version available" hint when a newer release is on PyPI; run `timecho-ai update` to upgrade the package and the skill together.

> **Plugin/extension-marketplace install** requires this repository to be publicly fetchable, so it will be enabled **once the repo is open-sourced**. The repo is currently private; use the per-host `timecho-ai skill --install` + manual MCP registration above — every component ships in the `timecho_ai` package, so no repo clone is needed.

---

# Part 2 · Building from source

For contributors, or to self-check the full flow before a release. Below is the complete path from a fresh clone to integration with Claude Code or Codex.

## Prerequisites

- **Python ≥ 3.10** (required by the official MCP SDK). Check: `python3 --version`
- **git**
- Plotting (optional): `[plot]` pulls `plotly` + `kaleido`; kaleido 1.x downloads a headless Chrome on its first PNG render, so it needs outbound network access.
- To register the MCP server with Claude Code, install the **Claude Code CLI** (`claude`).

## 1. Get the source

```bash
git clone https://github.com/TimechoLab/Timecho-AI.git
cd Timecho-AI
```

## 2. Create a virtualenv and install

```bash
python3 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip

pip install -e '.[all]'            # recommended for self-check: all extras
# or for development: pip install -e '.[dev]'  (test/build/format + all extras)
```

See the [extras table in Part 1](#installation); `dev` adds `pytest` / `build` / `twine` / `black` / `isort` on top of `all`.

## 3. Self-check: test / format / build

```bash
# Tests (mock-only, no real API key or network)
./scripts/run_tests.sh                 # or: python -m pytest tests/ -v

# Formatting & static checks
./scripts/format.sh                    # black + isort (auto-format)
./scripts/lint.sh                      # check-only (same as CI)

# Build wheel/sdist and verify
./scripts/build.sh                     # produces dist/timecho_ai-<ver>-py3-none-any.whl
./scripts/check.sh                     # twine check
```

Expected: tests all green (the 2 PNG-render tests skip automatically without a browser); the wheel contains `timecho_ai/cli.py`, `timecho_ai/mcp_server.py`, `timecho_ai/_io.py` and registers both `timecho-ai` and `timecho-ai-mcp`:

```bash
unzip -l dist/timecho_ai-*.whl | grep -E '_io|cli|mcp_server'
unzip -p dist/timecho_ai-*.whl '*entry_points.txt'
```

## 4. Run and verify from source

After setting your API key (see [Configuration](#configuration)), the CLI / MCP / skill behave exactly as in the released package (see the Part 1 sections). Quick run with the official sample data:

```bash
export TIMER_CLIENT_API_KEY="your-api-key"
timecho-ai --version && timecho-ai hello

curl -o sample.csv https://ai.timecho.com/data/sample.csv
timecho-ai forecast -i sample.csv --target target -l 12 \
    --time-col time --out pred.csv --plot pred.png
```

Register the MCP server with Claude Code (same as the released package — the `timecho-ai-mcp` command was installed into the venv by `-e`):

```bash
claude mcp add --transport stdio --scope project \
    --env TIMER_CLIENT_API_KEY="$TIMER_CLIENT_API_KEY" timecho-ai -- timecho-ai-mcp
# then run /mcp inside Claude Code to verify timecho-ai and its forecast tools
```

> Run the server manually (Ctrl-C to exit; stdout carries only JSON-RPC):
> `timecho-ai mcp serve` or `python -m timecho_ai.mcp_server`

## 5. Troubleshooting

| Symptom | Cause / fix |
|---------|-------------|
| `pip install` rejects the Python version | Python ≥ 3.10 is required |
| `timecho-ai: command not found` | venv not activated, or the `[cli]`/`[mcp]` extra not installed |
| CLI prints "CLI requires the [cli] extra" | `pip install -e '.[cli]'` |
| Plotting raises `PlotDependencyError` | `[plot]` not installed, or kaleido cannot launch a headless Chrome (no network / no browser deps). Install `[plot]` and allow the Chrome download; fall back to CSV/JSON output if plotting is unavailable |
| `AuthenticationError` (exit code 3) | `TIMER_CLIENT_API_KEY` is not set |
| `/mcp` doesn't list the server in Claude Code | check `timecho-ai-mcp` is on PATH, `.mcp.json` is at the project root, and the launching shell injected the API key |
| MCP protocol / parse errors | stdout must stay clean — the server logs to stderr only; never `print` to stdout in a tool |

## Self-check checklist (copy-paste)

```bash
git clone https://github.com/TimechoLab/Timecho-AI.git && cd Timecho-AI
python3 -m venv .venv && source .venv/bin/activate
pip install -U pip && pip install -e '.[dev]'
./scripts/lint.sh && python -m pytest tests/ -v
./scripts/build.sh && ./scripts/check.sh
export TIMER_CLIENT_API_KEY="your-api-key"
timecho-ai --version && timecho-ai hello
curl -o sample.csv https://ai.timecho.com/data/sample.csv
timecho-ai forecast -i sample.csv --target target -l 12 --time-col time --out pred.csv --plot pred.png
claude mcp add --transport stdio --scope project \
    --env TIMER_CLIENT_API_KEY="$TIMER_CLIENT_API_KEY" timecho-ai -- timecho-ai-mcp
# then run /mcp inside Claude Code to verify
```

---

## License

[Apache License 2.0](LICENSE)

