Who commanded Yehoshua?
Ramban #2 (citing the Ibn Ezra): Moshe commanded him in the Name of Hashem. 3
Seforno and Moshav Zekenim (in Pasuk 14): Hashem now appointed Yehoshua to be the leader and commander over Yisrael [after Moshe]. 4
See Sifsei Chachamim.
Ramban: And we find numerous examples of this in the Torah. See for example Devarim 11:14 & 15 and Devarim 29:5.
Seforno: "Vayetzav" means 'appointed', as in Shmuel 2, 7:11 and in Shmuel 1, 25:30.
What are implications of "Ki Atah Tavi ... Anochi Eh'yeh Imach"?
Rashi (In Yehoshua, 7:10): It implies that if Yehoshua leads the troops into battle, they will win; otherwise they will lose. 1
Refer to Bamidbar, 27:17:1:1**.