If you are referring to John 14:15, do read it in context, because with it comes the promise of the forever indwelling Holy Ghost.
John 14:15 If ye love me, keep my commandments.
16
And I will pray the Father, and he shall give you another Comforter, that he may abide with you for ever; 17 Even the Spirit of truth; whom the world cannot receive, because it seeth him not, neither knoweth him: but ye know him; for he dwelleth with you, and shall be in you.
So what commandments do we need to keep in order to receive the promise of the forever indwelling Holy Ghost?
That is pretty important and so I would say Jesus would have mentioned it in context, right? So let us read the prior verses and see what those commandments are.
John 14:1Let not your heart be troubled:
ye believe in God, believe also in me.
2 In my Father's house are many mansions: if it were not so, I would have told you. I go to prepare a place for you.
3 And if I go and prepare a place for you, I will come again, and receive you unto myself; that where I am, there ye may be also.
4 And whither I go ye know, and the way ye know.
5 Thomas saith unto him, Lord, we know not whither thou goest; and how can we know the way?
6 Jesus saith unto him, I am the way, the truth, and the life: no man cometh unto the Father, but by me.
7 If ye had known me, ye should have known my Father also: and from henceforth ye know him, and have seen him.
8 Philip saith unto him, Lord, show us the Father, and it sufficeth us.
9 Jesus saith unto him, Have I been so long time with you, and yet hast thou not known me, Philip? he that hath seen me hath seen the Father; and how sayest thou then, Show us the Father?
10 Believest thou not that I am in the Father, and the Father in me? the words that I speak unto you I speak not of myself: but the Father that dwelleth in me, he doeth the works.
11 Believe me that I am in the Father, and the Father in me:
or else believe me for the very works' sake.
12 Verily, verily, I say unto you,
He that believeth on me, the works that I do shall he do also; and greater works than these shall he do; because I go unto my Father.
13 And whatsoever ye shall ask in my name, that will I do, that the Father may be glorified in the Son.
14 If ye shall ask any thing in my name, I will do it.
So I see the repeated commandment to believe Him in order to receive the promise of the forever indwelling holy Ghost.
We need Jesus Christ in us so we have power to follow Him in keeping His commandments as his disciples as we live by faith in Him as our Good Shepherd & Friend to help us to follow Him daily by enabling us to lay aside every weight ( provisions for the flesh ) & sin Hebrews 12:1-2 to walk in the light in fellowship with the Father & the son in thought, word, & deed. 1 John 1:3-9
So the commandments for discipleship are separate from the commandments for salvation as we need to be born again of the spirit to have power to follow Jesus by faith, trusting Him as our Good Shepherd to do His work in us to make us good and to do good by the same grace of God. That is why it is simply written that the just shall live by faith.
Here are the commandments for discipleship for abiding in Him which covers all His commandments.
John 6:28 Then said they unto him, What shall we do, that we might work the works of God?
29
Jesus answered and said unto them, This is the work of God, that ye believe on him whom he hath sent.
1 John 3:22 And whatsoever we ask, we receive of him, because we keep his commandments, and do those things that are pleasing in his sight.
23 And this is his commandment, That we should believe on the name of his Son Jesus Christ, and love one another, as he gave us commandment.
24 And he that keepeth his commandments dwelleth in him, and he in him. And hereby we know that he abideth in us, by the Spirit which he hath given us.