fix(docs): Repair every stale link in the repo (#3727)

This commit is contained in:
Marko Vejnovic
2026-07-23 17:39:54 -07:00
committed by GitHub
parent e72372e35f
commit 1292c21e4e
21 changed files with 136 additions and 58 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ ignore = [
# This is a vuln on RSA. RSA is in our lockfile, but not in cargo-tree.
# It is a issue with sqlx/cargo, and does not affect Atuin.
# See:
# - https://github.com/launchbadge/sqlx/issues/3211
# - https://github.com/transact-rs/sqlx/issues/3211
# - https://github.com/rust-lang/cargo/issues/10801
"RUSTSEC-2023-0071"
]
+1 -1
View File
@@ -12,7 +12,7 @@ header = """
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
# https://keats.github.io/tera/
body = """
{% if version %}\
## {{ version | trim_start_matches(pat="v") }}
+3 -1
View File
@@ -882,7 +882,9 @@ impl AiApp {
.map(|cmd| format!("- `/{}` — {}", cmd.name, cmd.description))
.collect::<Vec<_>>()
.join("\n");
include_str!("content/help.md").replace("{commands}", &commands)
include_str!("content/help.md")
.replace("{commands}", &commands)
.replace("{docs_url}", &atuin_common::docs::url("ai/introduction/"))
}
other => format!("Unknown command: {other}"),
}
+1 -1
View File
@@ -3,4 +3,4 @@ Welcome to Atuin AI, an AI assistant in your terminal. You can ask it to generat
Commands:
{commands}
For more information, see [https://docs.atuin.sh/ai/introduction/](https://docs.atuin.sh/ai/introduction/)
For more information, see [{docs_url}]({docs_url})
+4 -4
View File
@@ -121,11 +121,11 @@ mod test {
// v13.0.1 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q==
// v14.0.0 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q==
// v14.0.1 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q==
// c7d89c1 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/ellie/atuin/pull/805)
// b53ca35 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/ellie/atuin/pull/974)
// c7d89c1 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/atuinsh/atuin/pull/805)
// b53ca35 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/atuinsh/atuin/pull/974)
// v15.0.0 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q==
// b8b57c8 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q== (https://github.com/ellie/atuin/pull/1057)
// 8c94d79 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/ellie/atuin/pull/1089)
// b8b57c8 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q== (https://github.com/atuinsh/atuin/pull/1057)
// 8c94d79 3AAgG1sqW8zSawnM2MyqzL7M8j4GVEXMlMyUNcz7dczizKfMrTRSIsyKbsypfFzM5Q== (https://github.com/atuinsh/atuin/pull/1089)
let key = Key::from([
27, 91, 42, 91, 210, 107, 9, 216, 170, 190, 242, 62, 6, 84, 69, 148, 148, 53, 251, 117,
+1 -1
View File
@@ -33,7 +33,7 @@ See
- <https://docs.aws.amazon.com/wellarchitected/latest/financial-services-industry-lens/use-envelope-encryption-with-customer-master-keys.html>
- <https://cloud.google.com/kms/docs/envelope-encryption>
- <https://learn.microsoft.com/en-us/azure/storage/blobs/client-side-encryption?tabs=dotnet#encryption-and-decryption-via-the-envelope-technique>
- <https://www.yubico.com/gb/product/yubihsm-2-fips/>
- <https://www.yubico.com/products/hardware-security-module/>
- <https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html#encrypting-stored-keys>
Why would we care? In the past we have received some requests for company solutions. If in future we can configure a
+81
View File
@@ -0,0 +1,81 @@
//! Links into the versioned documentation site.
//!
//! docs.atuin.sh is versioned with mike, and the three kinds of version it
//! publishes are not equally durable (see `.github/actions/docs-deploy-*`):
//!
//! TODO(markovejnovic): This file is debt and slop. Probably doesn't belong in atuin-common even.
/// The docs.atuin.sh version segment matching this build.
pub const VERSION: &str = version_segment(env!("CARGO_PKG_VERSION"));
/// A URL for `path` (e.g. `guide/sync/#login`) in this build's documentation.
pub fn url(path: &str) -> String {
format!("https://docs.atuin.sh/{VERSION}/{path}")
}
const fn version_segment(version: &str) -> &str {
let bytes = version.as_bytes();
let mut i = 0;
while i < bytes.len() {
if bytes[i] == b'-' {
return "main";
}
i += 1;
}
let mut end = 0;
let mut dots = 0;
while end < bytes.len() {
if bytes[end] == b'.' {
dots += 1;
if dots == 2 {
break;
}
}
end += 1;
}
match std::str::from_utf8(bytes.split_at(end).0) {
Ok(segment) => segment,
Err(_) => "main",
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn stable_releases_pin_to_their_minor() {
assert_eq!(version_segment("18.17.0"), "18.17");
assert_eq!(version_segment("18.17.1"), "18.17");
assert_eq!(version_segment("19.0.0"), "19.0");
assert_eq!(version_segment("100.200.300"), "100.200");
}
#[test]
fn prereleases_fall_back_to_main() {
// Pinning these to `18.18.0-beta.2` would 404 once 18.18.0 shipped and
// the preview was pruned.
assert_eq!(version_segment("18.18.0-beta.2"), "main");
assert_eq!(version_segment("18.16.0-beta.1"), "main");
assert_eq!(version_segment("19.0.0-rc.1"), "main");
}
#[test]
fn this_build_resolves_to_a_published_version() {
// Either `X.Y` or `main`; never a full version, and never empty.
assert!(!VERSION.is_empty());
assert!(VERSION == "main" || VERSION.split('.').count() == 2);
assert!(!VERSION.contains('-'));
}
#[test]
fn urls_are_absolute_and_versioned() {
assert_eq!(
url("guide/sync/#login"),
format!("https://docs.atuin.sh/{VERSION}/guide/sync/#login")
);
}
}
+1
View File
@@ -60,6 +60,7 @@ macro_rules! new_uuid {
#[cfg(feature = "ansi")]
pub mod ansi;
pub mod api;
pub mod docs;
pub mod logs;
pub mod path;
pub mod record;
+1 -1
View File
@@ -1,4 +1,4 @@
//! Adapted from the `boxcar` crate at <https://github.com/ibraheemdev/boxcar/blob/master/src/raw.rs>
//! Adapted from the `boxcar` crate at <https://github.com/ibraheemdev/boxcar/blob/master/src/vec/raw.rs>
//! under MIT licenes:
//!
//! Copyright (c) 2022 Ibraheem Ahmed
@@ -187,7 +187,10 @@ impl Cmd {
);
println!("You can find your key by running 'atuin key' on the other machine.");
println!("Do not share this key with anyone.");
println!("\nRead more here: https://docs.atuin.sh/guide/sync/#login \n");
println!(
"\nRead more here: {} \n",
atuin_common::docs::url("guide/sync/#login")
);
let key = or_user_input(
self.key.clone(),
+6 -1
View File
@@ -397,7 +397,12 @@ fn checks(info: &DoctorDump) {
println!(); // spacing
//
let zfs_error = "[Filesystem] ZFS is known to have some issues with SQLite. Atuin uses SQLite heavily. If you are having poor performance, there are some workarounds here: https://github.com/atuinsh/atuin/issues/952".bold().red();
let bash_plugin_error = "[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh (>= 0.4) be installed. An older ble.sh may not be detected. so ignore this if you have ble.sh >= 0.4 set up! Read more here: https://docs.atuin.sh/guide/installation/#bash".bold().red();
let bash_plugin_error = format!(
"[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh (>= 0.4) be installed. An older ble.sh may not be detected. so ignore this if you have ble.sh >= 0.4 set up! Read more here: {}",
atuin_common::docs::url("guide/installation/#installing-the-shell-plugin")
)
.bold()
.red();
let blesh_integration_error = "[Shell] Atuin and ble.sh seem to be loaded in the session, but the integration does not seem to be working. Please check the setup in .bashrc.".bold().red();
let openbsd_warning = "[System] OpenBSD is not officially supported.".bold().red();
@@ -12,7 +12,7 @@ pub fn format_duration_into(dur: Duration, f: &mut fmt::Formatter<'_>) -> fmt::R
}
// impl taken and modified from
// https://github.com/tailhook/humantime/blob/master/src/duration.rs#L295-L331
// https://github.com/chronotope/humantime/blob/76c8929b4cc286f675322475a8e1841f35bafc57/src/duration.rs#L427-L465
// Copyright (c) 2016 The humantime Developers
fn fmt(f: Duration) -> ControlFlow<(&'static str, u64), ()> {
let secs = f.as_secs();
+9 -1
View File
@@ -23,10 +23,18 @@ fn parse_ngram_size(s: &str) -> Result<usize, String> {
Ok(value)
}
fn period_long_help() -> String {
format!(
"Compute statistics for the specified period, leave blank for statistics since the beginning. See [this]({}) for more details.",
atuin_common::docs::url("reference/stats/")
)
}
#[derive(Parser, Debug)]
#[command(infer_subcommands = true)]
pub struct Cmd {
/// Compute statistics for the specified period, leave blank for statistics since the beginning. See [this](https://docs.atuin.sh/reference/stats/) for more details.
/// Compute statistics for the specified period, leave blank for statistics since the beginning
#[arg(long_help = period_long_help())]
period: Vec<String>,
/// How many top commands to list
+2 -2
View File
@@ -18,11 +18,11 @@ export ATUIN_CONFIG_DIR = /home/ellie/.atuin
Этот файл используется когда клиент работает на локальной машине (не сервере).
Пример можно увидеть в [config.toml](../../atuin-client/config.toml)
Пример можно увидеть в [config.toml](../../crates/atuin-client/config.toml)
### `dialect`
Этот параметр контролирует как [stats](stats.md) команда обрабатывает данные.
Этот параметр контролирует как [stats](stats_ru.md) команда обрабатывает данные.
Может принимать одно из двух допустимых значений:
```
+4 -4
View File
@@ -68,10 +68,10 @@ ATUIN_DB_URI="postgres://user:password@hostname/database"
## Docker
Поддерживается образ Docker чтобы сделать проще развертывание сервера в контейнере.
Поддерживается образ Docker чтобы сделать проще развертывание сервера в контейнере. Тег `latest` не публикуется, поэтому найдите номер последнего релиза на [странице релизов](https://github.com/atuinsh/atuin/releases) и подставьте его вместо `<LATEST TAGGED RELEASE>`.
```sh
docker run -d -v "$USER/.config/atuin:/config" ghcr.io/ellie/atuin:latest server start
docker run -d -v "$USER/.config/atuin:/config" ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE> start
```
## Docker Compose
@@ -94,8 +94,8 @@ version: '3.5'
services:
atuin:
restart: always
image: ghcr.io/ellie/atuin:main
command: server start
image: ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE>
command: start
volumes:
- "./config:/config"
links:
+6 -28
View File
@@ -87,33 +87,17 @@ Atuin 有一个 Discord 社区, 可以在 [这里](https://discord.gg/Fq8bJSKPHh
阅读下面的更多信息,了解仅供离线使用或托管您自己的服务器。
```
bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
atuin register -u <USERNAME> -e <EMAIL> -p <PASSWORD>
atuin import auto
atuin sync
```
### 使用活跃图
除了托管 Atuin 服务器外,还有一个服务可以用来生成你的 shell 历史记录使用活跃图!这个功能的灵感来自于 GitHub 的使用活跃图。
例如,这是我的:
![](https://api.atuin.sh/img/ellie.png?token=0722830c382b42777bdb652da5b71efb61d8d387)
如果你也想要,请在登陆你的同步服务器后,执行
```
curl https://api.atuin.sh/enable -d $(cat ~/.local/share/atuin/session)
```
执行结果为你的活跃图 URL 地址。可以共享或嵌入这个 URL 地址,令牌(token)并<i>不是</i>加密的,只是用来防止被枚举攻击。
## 仅离线 (不同步)
```
bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
atuin import auto
```
@@ -126,7 +110,7 @@ atuin import auto
```
# 不要以root身份运行,如果需要的话,会要求root。
bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
```
然后可直接看 <a href="#shell-plugin">Shell 插件</a>
@@ -161,7 +145,7 @@ sudo port install atuin
### Pacman
Atuin 在 Arch Linux 的 [社区存储库](https://archlinux.org/packages/community/x86_64/atuin/) 中可用。
Atuin 在 Arch Linux 的 [extra 存储库](https://archlinux.org/packages/extra/x86_64/atuin/) 中可用。
```
pacman -S atuin
@@ -172,7 +156,7 @@ pacman -S atuin
### 从源码编译安装
```
git clone https://github.com/ellie/atuin.git
git clone https://github.com/atuinsh/atuin.git
cd atuin/crates/atuin
cargo install --path .
```
@@ -192,7 +176,7 @@ echo 'eval "$(atuin init zsh)"' >> ~/.zshrc
或使用插件管理器:
```
zinit load ellie/atuin
zinit load atuinsh/atuin
```
### bash
@@ -220,12 +204,6 @@ atuin init fish | source
到 `~/.config/fish/config.fish` 文件中的 `is-interactive` 块中
### Fig
通过 [Fig](https://fig.io) 可为 zsh, bash 或 fish 一键安装 `atuin` 脚本插件。
<a href="https://fig.io/plugins/other/atuin" target="_blank"><img src="https://fig.io/badges/install-with-fig.svg" /></a>
## ...这个名字是什么意思?
Atuin 以 "The Great A'Tuin" 命名, 这是一只来自 Terry Pratchett 的 Discworld 系列书籍的巨龟。
+1 -1
View File
@@ -16,7 +16,7 @@ export ATUIN_CONFIG_DIR = /home/ellie/.atuin
客户端运行在用户的机器上,除非你运行的是服务器,否则这就是你所关心的。
见 [config.toml](../../atuin-client/config.toml) 中的例子
见 [config.toml](../../crates/atuin-client/config.toml) 中的例子
### `dialect`
+4 -4
View File
@@ -1,9 +1,9 @@
# Docker
Atuin 提供了一个 docker 镜像(image),可以更轻松地将服务器部署为容器(container)。
Atuin 提供了一个 docker 镜像(image),可以更轻松地将服务器部署为容器(container)。镜像没有发布 `latest` 标签,请在[发布页面](https://github.com/atuinsh/atuin/releases)查找最新的发布版本号,替换下面的 `<LATEST TAGGED RELEASE>`。
```sh
docker run -d -v "$USER/.config/atuin:/config" ghcr.io/ellie/atuin:latest server start
docker run -d -v "$USER/.config/atuin:/config" ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE> start
```
# Docker Compose
@@ -25,8 +25,8 @@ version: '3.5'
services:
atuin:
restart: always
image: ghcr.io/ellie/atuin:main
command: server start
image: ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE>
command: start
volumes:
- "./config:/config"
links:
+2 -2
View File
@@ -20,7 +20,7 @@ stringData:
immutable: true
```
为 Atuin 服务器创建 [`atuin.yaml`](../../k8s/atuin.yaml) 文件:
为 Atuin 服务器创建 [`atuin.yaml`](../../k8s/atuin.yaml) 文件。与 Docker 镜像一样,没有发布 `latest` 标签,请在[发布页面](https://github.com/atuinsh/atuin/releases)查找最新的发布版本号,替换下面的 `<LATEST TAGGED RELEASE>`:
```yaml
@@ -56,7 +56,7 @@ spec:
value: "8888"
- name: ATUIN_OPEN_REGISTRATION
value: "true"
image: ghcr.io/atuinsh/atuin:latest
image: ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE>
name: atuin
ports:
- containerPort: 8888
+2 -2
View File
@@ -27,7 +27,7 @@ stringData:
immutable: true
```
Create a [`atuin.yaml`](https://github.com/atuinsh/atuin/blob/main/k8s/atuin.yaml) file for the Atuin server:
Create a [`atuin.yaml`](https://github.com/atuinsh/atuin/blob/main/k8s/atuin.yaml) file for the Atuin server. As with the Docker image, there is no `latest` tag, so substitute the "LATEST TAGGED RELEASE" from the [releases page](https://github.com/atuinsh/atuin/releases):
```yaml
---
@@ -119,7 +119,7 @@ spec:
value: "8888"
- name: ATUIN_OPEN_REGISTRATION
value: "true"
image: ghcr.io/atuinsh/atuin:latest
image: ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE>
name: atuin
ports:
- containerPort: 8888
+1 -1
View File
@@ -29,7 +29,7 @@ spec:
value: "8888"
- name: ATUIN_OPEN_REGISTRATION
value: "true"
image: ghcr.io/atuinsh/atuin:latest
image: ghcr.io/atuinsh/atuin:<LATEST TAGGED RELEASE>
name: atuin
ports:
- containerPort: &port 8888