就業管理システムを作成する ーcodexで就業管理システムと打ち込むー

はじめに

ITエンジニアの転職の本を買って読んでみようと思ったが、あまり希望的なことが書かれていなさそうだったので、今の自分の仕事に関連するシステムをChatGPTに頼りながら作ってみたいと思う。

自分なんてないからという黄色い本にも他力と書かれていた。

AIという他者を信じて、進んでいこう。

現状、空のEmploy-management-systemリポジトリとcodexが紐づいている

空のEmploy-management-systemリポジトリ
codex

「就業管理システム」と打ってみたら、エラーが出て失敗した

This repository is empty. Create a default branch (e.g. main) by pushing an initial commit, then retry.

リポジトリが空。最初のコミットをプッシュして、デフォルトブランチ(例えば、main)を作成してください。そして、リトライ。

エラー解決を試みる

やることは、githubのサインインと、ローカルにフォルダ作成と、最初のコミットをプッシュ。

githubにサインイン
ローカルにフォルダ作成
「最初のコミットをプッシュ」までに行ったこと(画像)

「最初のコミットをプッシュ」までに行ったこと(テキスト)

hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git init
Initialized empty Git repository in /Users/hiroki/Documents/employment-management-system/.git/
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git remote add origin https://github.com/ki-hi-ro/Employment-management-system.git
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git add README.md
fatal: pathspec 'README.md' did not match any files
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % echo "# Employment-management-system" >> README.md
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git add README.md                                 
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git commit -m "first commit"
[main (root-commit) 064b589] first commit
 Committer: 柴田浩貴 <hiroki@shibatahiroshitakanoMacBook-Air.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
 create mode 100644 README.md
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git push -u origin main
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 269 bytes | 269.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/ki-hi-ro/Employment-management-system.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.
hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % 
「最初のコミットをプッシュ」完了

エラー解決したので処理が走った

処理中
処理完了

どんなシステムが出来上がったか?

作ってもらったシステムを確認していこう。

どうやって確認するのか?

とりあえず、右上のボタンをクリックして、PRを作成してみる。

PRを表示するになったので、クリックしてみる。

Margeする。

delete branchでブランチは削除した。

git pullでプルできた。

hiroki@shibatahiroshitakanoMacBook-Air employment-management-system % git pull
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (6/6), 3.67 KiB | 627.00 KiB/s, done.
From https://github.com/ki-hi-ro/Employment-management-system
   064b589..8a60ad5  main       -> origin/main
Updating 064b589..8a60ad5
Fast-forward
 README.md                |  46 ++++++++++++++++++++++++++++++++++++++++-
 employment_cli.py        |  96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 employment_management.py | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 employment_cli.py
 create mode 100644 employment_management.py

次回

次回は、README.mdの内容に従って、動かしてみよう。

# Employment Management System

A lightweight, file-based employment management CLI for registering employees and tracking daily attendance.

## Features
- Register employees with department and role information.
- List all employees.
- Clock employees in and out with timestamps.
- View attendance records for today or a specific date.

## Getting started
This tool only relies on the Python standard library. Use Python 3.10+.

```bash
python employment_cli.py --help
```

### Register an employee
```bash
python employment_cli.py add-employee "Alice Example" Sales "Account Manager"
```

### List employees
```bash
python employment_cli.py list
```

### Clock in / Clock out
```bash
python employment_cli.py clock-in 1
python employment_cli.py clock-out 1
```

### Attendance report
Show today's attendance:
```bash
python employment_cli.py report
```

Or for a specific date:
```bash
python employment_cli.py report --date 2024-08-01
```

Employee and attendance data are stored at `data/employees.json` in JSON format for easy portability.

“就業管理システムを作成する ーcodexで就業管理システムと打ち込むー” への1件のコメント

  1. khiro より:

    他力を信じて一歩踏み出し、エラーを構造的に解決しながら形にした過程そのものが成果。空のリポジトリから動くシステムへ到達した経験は、2026年の確かな土台になる。

khiro へ返信する コメントをキャンセル

メールアドレスが公開されることはありません。 が付いている欄は必須項目です