Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ktr
May 29, 2018
Technology
2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my CLI tool and technologies which supports it
ktr
May 29, 2018
More Decks by ktr
See All by ktr
詳解 MCP Go SDK / MCP Go SDK
ktr_0731
3
630
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
600
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.6k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
11k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
440
Designing libraries in Go way
ktr_0731
6
1.6k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
240
Fuzzy finder as a Go library
ktr_0731
3
6.3k
Other Decks in Technology
See All in Technology
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
520
10倍の生産性を実現するAI駆動並列エージェントのすべて
kumaiu
4
1.3k
非エンジニアがClaudeと挑んだ「1ヶ月間プロダクト30本ノック」
askokc
0
260
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
110
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー / AI Engineering Summit Tokyo 2026
tkyowa
53
59k
失敗を経て、Harness Engineering で 大切にしたいことを考える / Learning from Failure: What Matters in Harness Engineering
bitkey
PRO
1
290
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
Android の公式 Skill / Android skills
yanzm
0
120
RSA暗号を手計算したくなること、ありますよね?? (20260615_orestudy6_rsa)
thousanda
0
180
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
140
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
260
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
1.3k
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.2k
GraphQLとの向き合い方2022年版
quramy
50
15k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Facilitating Awesome Meetings
lara
57
7k
Building an army of robots
kneath
306
46k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Being A Developer After 40
akosma
91
590k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.7k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
570
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Color Theory Basics | Prateek | Gurzu
gurzu
0
360
Transcript
at u-aizu LT spring ࣗ࡞ CLI πʔϧͷϫʔΫϑϩʔͱ ͦΕΛࢧ͑Δٕज़
!LUS@ LUSɺΩλϩʔ ձେֶT XIPBNJ
!LUS@ LUSɺΩλϩʔ ձେֶT ແ৬ XIPBNJ
None
None
None
$-*πʔϧͷ ϝϯςφϯεͷ
w ΞοϓσʔτΛ͑Δखஈ͕ͳ͍ w खಈͰ ܧଓతʹϦϦʔε͢Δίετ ϝϯςφαΠυ
w ࠷৽͔Ͳ͏͔͔Βͳ͍ w Ξοϓσʔτ͕खؒ ϢʔβαΠυ
w (PQIFSɺαʔόΤϯδχΞҎ֎ Ϣʔβͱͯ͠ఆ w ࠷దͳΠϯετʔϧํ๏Λఏڙ͍ͨ͠ LUSFWBOT
w ϢʔβΠϯετʔϧํ๏ΛબΜͰΠϯετʔϧ w ϢʔβΞοϓσʔτΛߦ͏͔ΛબͿ͚ͩ w ΞοϓσʔτΛ֬ೝͤ͞ͳ͍ w Ξοϓσʔτํ๏Λߟ͑ͤ͞ͳ͍ ΄Μͱ͏ʹඞཁͳ͜ͱ
˞ Ҏ߱ͷϑϩʔ(PϓϩδΣΫτΛ લఏͱ͍ͯ͠·͢
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump
w ϓϩδΣΫτͷόʔδϣχϯά w $*ͱ࿈ܞͨ͠ϏϧυɺϦϦʔε w πʔϧͷࣗಈతͳΞοϓσʔτ $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB
commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump LUSHPTFNWFS
ηϚϯςΟοΫόʔδϣχϯά cmd/bumpʹΑΔߋ৽ LUSHPTFNWFS var v = semver.MustParse("0.3.1") $ bump patch
main.go package main ... var v = semver.MustParse("0.3.2") CLI main.go
"45ม͠ɺόʔδϣϯΛ୳͢ ͜ͱͰɺ҆શʹॻ͖͕͑Մೳ LUSHPTFNWFS *ast.CallExpr { . Fun: *ast.SelectorExpr { .
. X: *ast.Ident { . . . NamePos: meta.go:10:12 . . . Name: "semver" . . } . . Sel: *ast.Ident { . . . NamePos: meta.go:10:19 . . . Name: "MustParse" . . } . } . Lparen: meta.go:10:28 . Args: []ast.Expr (len = 1) { . . 0: *ast.BasicLit { . . . ValuePos: meta.go:10:29 . . . Kind: STRING . . . Value: "\"0.3.1\"" . . } . } . Ellipsis: - . Rparen: meta.go:10:36 }
NJUDIFMMIHPYUDOLTNHIS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
ෳϓϥοτϑΥʔϜ͚ʹϏϧυ (JU)VC3FMFBTFTͷ NJUDIFMMIHPY UDOLTNHIS mitchellh/gox gox -osarch "$OSARCH" . for
f in *; do mv "$f" evans tar cvzf "$f.tar.gz" evans rm -f evans done tcnksm/ghr git tag "$VERSION" git push origin "$VERSION" ghr "$VERSION" pkg
LUSHPVQEBUFS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
w ࣗಈΞοϓσʔτ༻ϥΠϒϥϦ w ҙͷखஈ .FBOT ͰΞοϓσʔτ͕Մೳ LUSHPVQEBUFS
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.NewMeans( github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.SelectAvailableMeansFrom( context.Background(), brew.HomebrewMeans("ktr0731/evans", "evans"), github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
$-*Ϟʔυ 3&1-Ϟʔυ autoUpdate USVF ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτඇදࣔ ඇಉظΞοϓσʔτ autoUpdate GBMTF
ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτදࣔ ಉظΞοϓσʔτ
None
w HPTFNWFSʹΑΔόʔδϣχϯά w HPYHISʹΑΔϏϧυɺϦϦʔε w HPVQEBUFSʹΑΓɺΞοϓσʔτखॱʹ ؔ͢ΔࣝΛϢʔβ͔Βશʹ ·ͱΊ
w IUUQTNPUFNFOIBUFOBCMPHDPNFOUSZ HPHPCVNQWFSTJPOJOH w IUUQTEFFFFUDPNXSJUJOHHIS w IUUQTTZGNIBUFOBCMPHDPNFOUSZ ࢀߟ
w (P-PHPJT$PQZSJHIU5IF(P"VUIPST "MMSJHIUTSFTFSWFE $PQZSJHIU