Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .aigne/doc-smith/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Project information for documentation publishing
projectName: to-where-cli
projectDesc: A command-line tool that uses an alias mechanism to help you
quickly open websites, GitHub repositories, and search pages, improving
developer workflow.
projectLogo: "https://avatars.githubusercontent.com/u/33124160?s=48&v=4"

# =============================================================================
# Documentation Configuration
# =============================================================================

# Purpose: What's the main outcome you want readers to achieve?
# Available options (uncomment and modify as needed):
# getStarted - Get started quickly: Help new users go from zero to working in <30 minutes
# completeTasks - Complete specific tasks: Guide users through common workflows and use cases
# findAnswers - Find answers fast: Provide searchable reference for all features and APIs
# understandSystem - Understand the system: Explain how it works, why design decisions were made
# solveProblems - Troubleshoot common issues: Help users troubleshoot and fix issues
# mixedPurpose - Serve multiple purposes: Comprehensive documentation covering multiple needs
documentPurpose:
- completeTasks
- findAnswers

# Target Audience: Who will be reading this most often?
# Available options (uncomment and modify as needed):
# endUsers - End users (non-technical): People who use the product but don't code
# developers - Developers integrating your product/API: Engineers adding this to their projects
# devops - DevOps / SRE / Infrastructure teams: Teams deploying, monitoring, maintaining systems
# decisionMakers - Technical decision makers: Architects, leads evaluating or planning implementation
# supportTeams - Support teams: People helping others use the product
# mixedTechnical - Mixed technical audience: Developers, DevOps, and technical users
targetAudienceTypes:
- developers

# Reader Knowledge Level: What do readers typically know when they arrive?
# Available options (uncomment and modify as needed):
# completeBeginners - Is a total beginner, starting from scratch: New to this domain/technology entirely
# domainFamiliar - Has used similar tools before: Know the problem space, new to this specific solution
# experiencedUsers - Is an expert trying to do something specific: Regular users needing reference/advanced topics
# emergencyTroubleshooting - Emergency/troubleshooting: Something's broken, need to fix it quickly
# exploringEvaluating - Is evaluating this tool against others: Trying to understand if this fits their needs
readerKnowledgeLevel: domainFamiliar

# Documentation Depth: How comprehensive should the documentation be?
# Available options (uncomment and modify as needed):
# essentialOnly - Essential only: Cover the 80% use cases, keep it concise
# balancedCoverage - Balanced coverage: Good depth with practical examples [RECOMMENDED]
# comprehensive - Comprehensive: Cover all features, edge cases, and advanced scenarios
# aiDecide - Let AI decide: Analyze code complexity and suggest appropriate depth
documentationDepth: balancedCoverage

# Custom Rules: Define specific documentation generation rules and requirements
rules: ""

# Target Audience: Describe your specific target audience and their characteristics
targetAudience: ""

# Glossary: Define project-specific terms and definitions
# glossary: "@glossary.md" # Path to markdown file containing glossary definitions

locale: en
translateLanguages:
- zh
docsDir: .aigne/doc-smith/docs # Directory to save generated documentation
sourcesPath: # Source code paths to analyze
- ./
lastGitHead: 1d93641ab14f236814550f8c709d71f6c66a0b93
appUrl: https://docsmith.aigne.io
boardId: to-where-cli
# Checkout ID for document deployment service
checkoutId: ""
12 changes: 12 additions & 0 deletions .aigne/doc-smith/docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* [Overview](/overview.md)
* [Getting Started](/getting-started.md)
* [Installation](/getting-started-installation.md)
* [Basic Usage](/getting-started-basic-usage.md)
* [Command Reference](/command-reference.md)
* [Core Commands](/command-reference-core.md)
* [Git Command](/command-reference-git.md)
* [Search Commands](/command-reference-search.md)
* [Development Guide](/development.md)
* [Project Structure](/development-project-structure.md)
* [Available Scripts](/development-scripts.md)
* [Changelog](/changelog.md)
69 changes: 69 additions & 0 deletions .aigne/doc-smith/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Changelog

This page provides a detailed history of all changes, new features, and bug fixes for each version of `to-where-cli`.

## 0.0.23 - 2024-06-06

- **Chore:** Removed useless codes.

## 0.0.22 - 2024-06-06

- **Feat:** Added run kit options to the npm command.

## 0.0.21 - 2023-09-13

- **Feat:** Extended the npm command (`tw npm -c/-d/-v`).

## 0.0.20 - 2023-07-11

- **Feat:** Supports opening a specified branch.
- **Feat:** Support for opening the first commit.

## 0.0.19 - 2023-05-21

- **Feat:** Supports opening a specified branch.
- **Feat:** Support for opening the first commit.
- **Docs:** Updated `README.md` and GitBook site documentation.

## 0.0.18 - 2023-05-14

- **Feat:** Perfected the test suite.

## 0.0.17 - 2023-02-26

- **Feat:** Added support for opening the star screen of a project.
- **Feat:** Added support for removing multiple aliases with `tw rm`.

## 0.0.16 - 2023-02-10

- **Feat:** Added support for searching on npm, Baidu, Google, Bing, and GitHub pages.
- **Feat:** The `tw list` subcommand now supports the `tw ls` shorthand.

## 0.0.15 - 2023-02-06

- **Feat:** The `git` subcommand now works with git SSH URLs.

## 0.0.14 - 2023-02-03

- **Feat:** Added support for creating pull requests using `tw git open --pull`.

## 0.0.13 - 2023-01-28

- **Feat:** Added support for releasing beta versions.
- **Fix:** Resolved a Windows installation error related to `npx only-allow pnpm`.
- **Feat:** Implemented a version check before release.

## 0.0.12 - 2023-01-27

- **Fix:** Corrected an error in the `README.md` file.

## 0.0.11 - 2023-01-27

- **Feat:** Added support for opening a file with a specified path via `tw git open --file xxx`.
- **Feat:** Added support for opening a commit with a specified hash via `tw git open -c xxx`.

## 0.0.10 - 2023-01-27

- **Feat:** Added support for the Windows operating system.
- **Feat:** Added support for opening git branch pages, issue list pages, and pull request list pages.
- **Feat:** Added support for visit statistics.
69 changes: 69 additions & 0 deletions .aigne/doc-smith/docs/changelog.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 更新日志

本页面详细记录了 `to-where-cli` 每个版本的所有变更、新功能和错误修复。

## 0.0.23 - 2024-06-06

- **Chore:** 移除了无用的代码。

## 0.0.22 - 2024-06-06

- **Feat:** 为 npm 命令添加了运行工具包选项。

## 0.0.21 - 2023-09-13

- **Feat:** 扩展了 npm 命令(`tw npm -c/-d/-v`)。

## 0.0.20 - 2023-07-11

- **Feat:** 支持打开指定分支。
- **Feat:** 支持打开首次提交。

## 0.0.19 - 2023-05-21

- **Feat:** 支持打开指定分支。
- **Feat:** 支持打开首次提交。
- **Docs:** 更新了 `README.md` 和 GitBook 网站文档。

## 0.0.18 - 2023-05-14

- **Feat:** 完善了测试套件。

## 0.0.17 - 2023-02-26

- **Feat:** 添加了打开项目 Star 页面的支持。
- **Feat:** 添加了使用 `tw rm` 删除多个别名的支持。

## 0.0.16 - 2023-02-10

- **Feat:** 添加了在 npm、百度、谷歌、必应和 GitHub 页面上进行搜索的支持。
- **Feat:** `tw list` 子命令现支持简写 `tw ls`。

## 0.0.15 - 2023-02-06

- **Feat:** `git` 子命令现可用于 git SSH URL。

## 0.0.14 - 2023-02-03

- **Feat:** 添加了使用 `tw git open --pull` 创建拉取请求的支持。

## 0.0.13 - 2023-01-28

- **Feat:** 添加了发布 beta 版本的支持。
- **Fix:** 解决了与 `npx only-allow pnpm` 相关的 Windows 安装错误。
- **Feat:** 实现了发布前的版本检查。

## 0.0.12 - 2023-01-27

- **Fix:** 修正了 `README.md` 文件中的一个错误。

## 0.0.11 - 2023-01-27

- **Feat:** 添加了通过 `tw git open --file xxx` 打开指定路径文件的支持。
- **Feat:** 添加了通过 `tw git open -c xxx` 打开指定哈希值提交的支持。

## 0.0.10 - 2023-01-27

- **Feat:** 添加了对 Windows 操作系统的支持。
- **Feat:** 添加了打开 git 分支页面、问题列表页面和拉取请求列表页面的支持。
- **Feat:** 添加了访问统计的支持。
154 changes: 154 additions & 0 deletions .aigne/doc-smith/docs/command-reference-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Core Commands

The core commands are the foundation of `to-where-cli`, providing all the necessary tools for managing your path aliases. They allow you to add, list, remove, and clear aliases efficiently. For a more guided tour of how these commands work together, you might want to start with the [Basic Usage](./getting-started-basic-usage.md) guide.

This section provides a detailed reference for each core command.

## add

The `add` command creates a new alias for a specified directory path. If no path is provided, it defaults to the current working directory.

### Usage

```sh
tw add [alias] [address]
```

### Arguments & Options

| Name | Description | Required |
|-----------|---------------------------------------------------------------------------------------------------------|----------|
| `alias` | A short, memorable name for the address. If omitted, the name of the current directory will be used. | No |
| `address` | The directory path you want to create an alias for. If omitted, the current working directory is used. | No |
| `-f, --force` | If the alias already exists, this option will overwrite it. Without this flag, the command will fail. | No |

### Examples

<x-cards>
<x-card data-title="Alias the current directory" data-icon="lucide:at-sign">
When run inside `/Users/dev/my-project`, this command creates an alias named `my-project` pointing to that directory.
</x-card>
<x-card data-title="Alias a specific directory" data-icon="lucide:folder-symlink">
This creates an alias named `api` that points to the specified absolute path.
</x-card>
<x-card data-title="Overwrite an existing alias" data-icon="lucide:replace">
If the `api` alias already exists, this command updates it to point to the new path.
</x-card>
</x-cards>

```sh title="Alias the current directory"
tw add
```

```sh title="Alias a specific directory with a custom name"
tw add api /Users/dev/work/project-api
```

```sh title="Force overwrite an existing alias"
tw add api /Users/dev/work/new-project-api --force
```

## rm

The `rm` command removes one or more aliases.

### Usage

```sh
tw rm [alias]
```

### Arguments

| Name | Description | Required |
|---------|-------------------------------------------------------------------------------------------------------------|----------|
| `alias` | The name of the alias to remove. If omitted, the command enters an interactive mode to select multiple aliases. | No |

### Examples

<x-cards>
<x-card data-title="Remove a single alias" data-icon="lucide:trash-2">
This will permanently delete the alias named `project-api`.
</x-card>
<x-card data-title="Remove aliases interactively" data-icon="lucide:list-checks">
This launches a checklist where you can select multiple aliases to delete at once.
</x-card>
</x-cards>

```sh title="Remove a specific alias"
tw rm project-api
```

```sh title="Enter interactive removal mode"
tw rm
```

## ls

The `ls` command (aliased as `list`) displays your saved aliases and their corresponding paths. The list is sorted by the number of visits in descending order.

### Usage

```sh
tw ls [alias]
```

### Arguments

| Name | Description | Required |
|---------|------------------------------------------------------------------|----------|
| `alias` | If provided, displays the details for only that specific alias. | No |

### Examples

<x-cards>
<x-card data-title="List all aliases" data-icon="lucide:list">
Displays a formatted list of all saved aliases, their paths, and visit counts.
</x-card>
<x-card data-title="Show a specific alias" data-icon="lucide:search">
Looks for an alias named `api` and prints its details if found.
</x-card>
</x-cards>

```sh title="List all saved aliases"
tw ls
```

```sh title="Display details for a single alias"
tw ls api
```

## clean

The `clean` command removes all existing aliases from your configuration.

### Usage

```sh
tw clean
```

### Options

| Name | Description | Required |
|---------------|--------------------------------------------------------------------------|----------|
| `-f, --force` | A safety measure to confirm the action. The command will not run without it. | Yes |

### Examples

<x-cards>
<x-card data-title="Attempt to clean without force" data-icon="lucide:shield-alert">
This command will fail and show an error message, preventing accidental data loss.
</x-card>
<x-card data-title="Permanently delete all aliases" data-icon="lucide:shield-check">
This will wipe all saved aliases from your configuration file.
</x-card>
</x-cards>

```sh title="Attempt to run without the force flag (will fail)"
tw clean
```

```sh title="Forcefully remove all aliases"
tw clean --force
```
Loading