Compare commits

..

4 Commits

Author SHA1 Message Date
4d0a7f3889 Add ai.os documentation and development guide
Some checks failed
build and push image / Release (push) Failing after 18m41s
- Add claude.md with project overview and game-oriented OS architecture
- Add DEVELOPMENT.md with OS development guidelines
- Update README.md with enhanced project description
- Include build instructions and configuration details

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 17:43:44 +09:00
55436e61ee fix
Some checks failed
build and push image / Release (push) Failing after 17m53s
2025-06-07 03:52:07 +09:00
21cd1ef16e update claude
Some checks failed
build and push image / Release (push) Failing after 12m2s
2025-06-07 01:22:13 +09:00
591c34b61b fix podman
Some checks failed
build and push image / Release (push) Failing after 24m57s
2025-04-12 03:06:43 +09:00
11 changed files with 266 additions and 170 deletions

View File

@ -0,0 +1,20 @@
{
"permissions": {
"allow": [
"Bash(find:*)",
"Bash(cat:*)",
"Bash(grep:*)",
"Bash(./scpt/gh-actions.zsh:*)",
"Bash(mkdir:*)",
"Bash(chmod:*)",
"Bash(../ai/scripts/generate_claude.sh:*)",
"Bash(jq:*)",
"Bash(ls:*)",
"Bash(../ai/scripts/sync_docs.sh:*)",
"Bash(mv:*)",
"Bash(rm:*)",
"Bash(../ai/scripts/update-submodules.sh:*)"
],
"deny": []
}
}

View File

@ -1,4 +1,5 @@
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries=["git.syui.ai", "docker.io", "ghcr.io"]
[aliases]

View File

@ -2,8 +2,8 @@ name: release
on:
push:
tags:
- 'v*'
branches:
- main
permissions:
contents: write
@ -26,27 +26,6 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
docker push ${{ env.IMAGE_NAME }}

79
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,79 @@
# ai.os プロジェクト固有情報
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
## 現在の実装状況
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
## 将来の発展方向
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
```
### Podman実行
```bash
podman pull aios # shortname alias
```
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```

167
README.md
View File

@ -1,112 +1,79 @@
# <img src="./icon/ai.png" width="30"> ai `os`
# ai.os プロジェクト固有情報
`aios` is a simple linux distribution based on `archlinux`.
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
|rule|var|
|---|---|
|name|ai os|
|code|aios|
|id|ai|
|container|[git.syui.ai/ai/os](https://git.syui.ai/ai/-/packages/container/os/latest)|
|image|[aios-bootstrap.tar.gz](https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz)|
## 現在の実装状況
```sh
$ docker run -it git.syui.ai/ai/os ai
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```
## link
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
|host|command|url|
|---|---|---|
|docker|syui/aios|https://hub.docker.com/r/syui/aios|
|github|ghcr.io/syui/aios|https://github.com/users/syui/packages/container/package/aios|
|syui|git.syui.ai/ai/os|https://git.syui.ai/ai/-/packages/container/os|
## 将来の発展方向
## base
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
```sh
# https://gitlab.archlinux.org/archlinux
$ git clone https://gitlab.archlinux.org/archlinux/archiso
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
```
## docker
```sh
# https://git.syui.ai/ai/-/packages/container/os
$ docker run -it git.syui.ai/ai/os ai
# https://hub.docker.com/r/syui/aios
$ docekr run -it syui/aios ai
# https://github.com/users/syui/packages/container/package/aios
$ docker run -it ghcr.io/syui/aios ai
### Podman実行
```bash
podman pull aios # shortname alias
```
## token
|env|body|
|---|---|
|${{ github.repository }}|syui/aios|
|${{ secrets.DOCKER_USERNAME }}|syui|
|${{ secrets.DOCKER_TOKEN }}|[token](https://matsuand.github.io/docs.docker.jp.onthefly/docker-hub/access-tokens/)|
|${{ secrets.APP_TOKEN }}|[token](https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens), pacakge|
## podman
```sh
if [ ! -d ~/ai/os/.git ];then
mkdir -p ~/ai
git clone https://git.syui.ai/ai/os ~/ai/os
else
cd ~/ai/os
fi
if [ ! -d ~/.config/containers/registries.conf.d ];then
mkdir -p ~/.config/containers/registries.conf.d
fi
ln -s `pwd`/.config/containers/registries.conf.d/ai.conf ~/.config/containers/registries.conf.d/ai.conf
```
```sh
$ podman pull aios
```
> ~/.config/containers/registries.conf.d/ai.conf
```sh
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
[aliases]
"aios" = "git.syui.ai/ai/os"
```
```sh
$ podman pull aios
Resolved "aios" as an alias (/etc/containers/registries.conf.d/ai.conf)
Trying to pull git.syui.ai/ai/os:latest...
Getting image source signatures
Copying blob c7e55fecf0be [====================>-----------------] 917.4MiB / 1.7GiB
```
## cron
stop
```sh
schedule:
- cron: "0 0 * * *"
```
## update action
```sh
$ vim build.zszh
$ ./scpt/gh-actions.zsh
```
## link
- https://git.syui.ai/ai/os
- https://github.com/syui/aios
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```

View File

@ -1,22 +1,2 @@
#!/bin/zsh
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/

View File

@ -1,4 +0,0 @@
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
[aliases]
"aios" = "git.syui.ai/ai/os"

View File

@ -26,27 +26,6 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
tar xf aios-bootstrap*.tar.gz
mkdir -p root.x86_64/var/lib/machines/arch
pacstrap -c root.x86_64/var/lib/machines/arch base
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
docker push ${{ env.IMAGE_NAME }}

View File

@ -1,7 +1,7 @@
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
IMAGE_ID=aios
IMAGE_VERSION=2024.02.11
IMAGE_VERSION=2025.06.07
NAME=ai os
PRETTY_NAME=ai os
ID=ai

79
claude.md Normal file
View File

@ -0,0 +1,79 @@
# ai.os プロジェクト固有情報
## プロジェクト概要
- **名前**: ai.os
- **パッケージ**: aios
- **タイプ**: ArchLinux-based OS
- **役割**: AI統合OS基盤
## 現在の実装状況
### OS基盤
- **ベース**: ArchLinux + archiso
- **配布形式**: Docker container (bootstrap tar.gz)
- **ビルドシステム**: GitHub Actions自動ビルド
- **レジストリ**: Docker Hub, GitHub Packages, git.syui.ai
### 搭載パッケージ
```bash
base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc
```
### AI統合コンポーネント
- **ai.bot**: Rust製、`/bin/ai`でインストール済み
- **ai.gpt**: 統合予定Python + fastapi_mcp
- **Container設定**: Podman用AI registryプリセット
## 将来の発展方向
### Phase 1: AI基盤統合
- **ai.gpt搭載**: MCPサーバー自動起動
- **ai.shell**: Claude Code風terminal組み込み
- **Python環境**: fastapi_mcp基盤
### Phase 2: ゲーム融合OS
- **ai.verse統合**: UEメタバース基盤
- **ai.card**: iOS/Web UI統合
- **自動起動**: systemdでAIサービス管理
### Phase 3: 統合デバイス化
- **ai.game device**: 専用ハードウェア対応
- **分散SNS**: atproto完全統合
- **現実反映**: ゲーム↔現実データ同期
## 技術仕様
### ビルド設定
- **profiledef.sh**: bootstrap modeでtar.gz生成
- **Version管理**: 日付ベース自動更新YYYY.MM.DD
- **CI/CD**: GitHub Actions + multi-registry push
### 設定管理
- **os-release**: `/etc/os-release`準拠
- **Container**: Podman shortname alias対応
- **Network**: ai.conf registryプリセット
### 開発環境
- **言語**: Rustai.bot, Pythonai.gpt統合予定
- **Shell**: zsh
- **Container**: Docker + Podman両対応
## 使用方法
### Docker実行
```bash
docker run -it git.syui.ai/ai/os ai
docker run -it syui/aios ai
docker run -it ghcr.io/syui/aios ai
```
### Podman実行
```bash
podman pull aios # shortname alias
```
### ローカルビルド
```bash
./scpt/gh-actions.zsh # GitHub Actions workflow生成
./build.zsh # ローカルビルド実行
```

View File

@ -1,5 +1,17 @@
#!/bin/zsh
# Platform-specific commands
case $OSTYPE in
darwin*)
sed_inplace() { sed -i '' "$@"; }
date_cmd() { gdate "$@"; }
;;
linux*)
sed_inplace() { sed -i "$@"; }
date_cmd() { date "$@"; }
;;
esac
d=${0:a:h}
dd=${0:a:h:h}
@ -56,6 +68,10 @@ yml_c=' tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME
aios-bootstrap.tar.gz
'
# Update version in os-release
current_date=$(date_cmd +%Y.%m.%d)
sed_inplace "s/IMAGE_VERSION=.*/IMAGE_VERSION=$current_date/" $dd/cfg/os-release
yml_b=`cat $dd/build.zsh |sed '1d'`
echo $yml_a >! $dd/cfg/gh-actions.yml